Caching routeInfo.json and react-static-routes.js #516
Comments
There are edge cases that limit us from using a hash in the filename for these files. If you would like to investigate and PR a fix, then please do! |
What are the edges cases? Since I think this can improve caching dramatically... |
I think I've just run into this caching issue. NOTE: I'm still on @tannerlinsley , do you think we could add that anti-cache query string by default? I mean something like
Thank you for your time |
I noticed in the build routeInfo.json and react-static-routes.js don't have a hash in the file name, so caching them is difficult.
Would hashes on these files be useful to have, or is there some better way to achieve this?
I did find this code in
src/client/methods.js
routeInfo.json?${process.env.REACT_STATIC_CACHE_BUST}
but no mention of how to use it. Presumably you set the environment variable REACT_STATIC_CACHE_BUST to a value before you build.
I seem to recall reading before query strings aren't great for caching, eg:
The text was updated successfully, but these errors were encountered: