Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assets handler: automatically configure Cache-Control on startup #512

Closed
jknack opened this issue Oct 20, 2016 · 0 comments
Closed

assets handler: automatically configure Cache-Control on startup #512

jknack opened this issue Oct 20, 2016 · 0 comments
Milestone

Comments

@jknack
Copy link
Member

jknack commented Oct 20, 2016

{
  assets("/assets/**");  
}

Asset handler will be automatically configured with assets.cache.maxAge property on startup. This property control the Cache-Control header, default value is -1 (no cache).

Allowed values includes

  • zero/negative number: turn off the cache control header
  • positive number: represents the number of seconds the set in the Cache-Control header
  • duration string: like 1d, 30s, 60m, 365d, etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant