Sinatra cache control is not working
-
04-06-2021 - |
Domanda
This is what I have done to my server
set :static_cache_control, [:public, {:max_age => 604800}]
However, when I use firebug I still see 0 max-age. And I'm using Sinatra Assets Pack http://ricostacruz.com/sinatra-assetpack/
I'm not sure if they conflict each other?
Thanks a lot.
Soluzione
Which file you add max-age header?
If it's JavaScript or CSS file, please try to build files with Sinatra-assetpack.
Files built are located in under 'public' directory.
Please see the following, written how to build.
http://ricostacruz.com/sinatra-assetpack/#need_to_build_the_files
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow