For example, there are 2 paths at the same domain: some_domain.com/first and some_domain.com/second.
Both of these paths return the same file, let's say - contents.html. Is it possible to configure caches in the way that after opening some_domain.com/first no loading will be performed for some_domain.com/second - so it will just reuse the cache prepared for some_domain.com/first?
Should it be done server-side by returning some special hypothetical Cache-Key: key_value header? The closest related thing could find is this question:
Is it possible to cache a file in the browser despite its querystring?
Update - I can rephrase it a little bit. I'm using React with its Router. The server is configured to return index.html for all possible paths allowing then to process routes by client-side JS. Let's say, there is some caching configured to prevent everything the server returns from being expired. But here is an issue. Once I open some_domain.com/first, it gets cached, so the next time I access the same path, it is not downloaded again. But even if some_domain.com/second returns the same index.html, it's not cached after some_domain.com/first had been opened - I need to open this second path as well (i.e. by reloading the corresponding page in browser) at least once to make it cached as well (while it's obviously pointless, as both routes return the same index.html).