Reputation: 160
My Grails 3 website includes many static resources like js and css, I found all these static resources are set to "no-cache" and "max-age=0" by default, which cause every time reloading the page, all these static resources have to be downloaded again, this causes significant performance problem.
I am using asset-pipeline to manage these static resources in application.js and application.css, how can I configure the cache setting so that the browser can cache the static resources?
Upvotes: 1
Views: 682
Reputation: 91
See https://github.com/grails/grails-core/issues/10410#issuecomment-273220646
Just add
grails.resources.cachePeriod: your value
to your application.yml
Upvotes: 2