-
Notifications
You must be signed in to change notification settings - Fork 203
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
Need to introduce HTTP Cache control #1121
Comments
@yegor256 WDYT about this issue ? |
@baudoliver7 I'm not against it, but how will it work? Can you give a usage example? |
@yegor256 We could introduce a new decorator of new TkCachedFiles (
origin, // take to decorate
maxage, // Max age in second
"css", "js", "png" // list of extensions of files to cache
) When we try to request for example a
By these headers, the browser will cache the file for the max age under the During the second request, Long life to decorator pattern ! :-) |
@baudoliver7 it seems we already have something with a similar functionality, don't we? |
@yegor256 I could be wrong but after checking, I haven't seen a take that works like this. |
@baudoliver7 let's do it then |
@yegor256 Besides, I think it will be good if we leave to the developer the choice of how to produce a unique identifier for ETag. |
@baudoliver7 yes, |
To optimize bandwidth usage, we need sometimes to put in cache some static files.
HTTP Cache control obeys to the norm RFC 7234.
There are some useful links:
The text was updated successfully, but these errors were encountered: