-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make cache lifetime for static files configurable #7
Labels
customer input
feature suggestion or bug report collected from existing or potential customers (source)
enhancement
enhances an existing feature or functionality (improvements)
Comments
robertlemke
added
customer input
feature suggestion or bug report collected from existing or potential customers (source)
enhancement
enhances an existing feature or functionality (improvements)
labels
May 4, 2022
robertlemke
added a commit
that referenced
this issue
May 4, 2022
This change introduces a new environment variable NGINX_STATIC_FILES_LIFETIME which allows for configuration of the cache lifetime controlled through the HTTP response's "expires" header. The default expiration time is now 30 days. Apart from Flow's static resources, additional files in the top directory are now covered (favicon.ico, apple-touch-icon.* etc). Resolves #7
The cache lifetime I set (30d) is too short – Google Lighthouse wants at least half a year. And we will need changes in the Google Cloud Storage plugin in order to achieve proper cache lifetimes for persistent resources (see flownative/flow-google-cloudstorage#32). |
robertlemke
added a commit
that referenced
this issue
May 5, 2022
The "expires" statement does not seem to have an effect – the lifetime provided by Google always won. However, providing Cache-Control might work and solve as a hotfix for flownative/flow-google-cloudstorage#32 #7
robertlemke
added a commit
that referenced
this issue
May 5, 2022
Google does not consider a lifetime of 30 days as long enough, but 6 months should work fine. #7
robertlemke
added a commit
that referenced
this issue
May 5, 2022
robertlemke
added a commit
that referenced
this issue
May 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
customer input
feature suggestion or bug report collected from existing or potential customers (source)
enhancement
enhances an existing feature or functionality (improvements)
The cache lifetime sent in an HTTP response as the "expires" header should be configurable via an environment variable.
The text was updated successfully, but these errors were encountered: