docs: Document the SPA and static cache control environment variables - #775
Open
developerjamiu wants to merge 2 commits into
Open
docs: Document the SPA and static cache control environment variables#775developerjamiu wants to merge 2 commits into
developerjamiu wants to merge 2 commits into
Conversation
SandPod
reviewed
Sep 2, 2026
| ); | ||
| ``` | ||
|
|
||
| To set the header per environment instead of in code, set `SERVERPOD_WEB_SERVER_STATIC_CACHE_CONTROL` to the `Cache-Control` value the route should send: |
Contributor
There was a problem hiding this comment.
Question - Have we listed these on the ENV page? What is the strategy around that currently?
Contributor
Author
There was a problem hiding this comment.
Not yet (thanks for the catch). The reference only listed variables that also have a config-file option, and these three are env-only. I'll add all three (including #756's FlutterRoute one) to the table with links to their pages. Going forward the rule is: every SERVERPOD_* variable gets a row in the reference, and the full explanation lives on the feature's own page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to #756. The web server ships three cache-control environment variables built on the same mechanism; #756 documents the
FlutterRouteone, and this adds the other two on their own pages:SERVERPOD_WEB_SERVER_STATIC_CACHE_CONTROLon the Static files page, next to the cache-control helpers it substitutes for.SERVERPOD_WEB_SERVER_SPA_CACHE_CONTROLon the Single-page apps page, including the two SpaRoute-specific rules: the fallback file is always served without aCache-Controlheader, and the static variable does not apply toSpaRoute.In all three cases an explicit
cacheControlFactorytakes precedence over the environment variable.