1

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?

Cache

Leo
  • 142
  • 1
  • 3
  • 11

1 Answers1

2

See https://github.com/grails/grails-core/issues/10410#issuecomment-273220646

Just add

grails.resources.cachePeriod: your value

to your application.yml

user1406564
  • 91
  • 1
  • 6