Skip to content

Fix caching#78

Merged
chrisjensen merged 1 commit into
mainfrom
fix/caching
Feb 26, 2026
Merged

Fix caching#78
chrisjensen merged 1 commit into
mainfrom
fix/caching

Conversation

@chrisjensen

Copy link
Copy Markdown
Member

Remove eTag headers that express automatically generates
Be explicit that most things should not be cached
Encourage caching of media

Add cache directives to routes with safe caching patterns

- Disable Express ETag generation (all responses are user-specific)
- Set Cache-Control: no-store as default for all responses
- Set Cache-Control: no-store on error responses to prevent caching of 404/403
- Export shared cache constants for routes to use

- Public key endpoints cache for 5 minutes (CACHE_SHORT_PRIVATE)
- Immutable media blobs cache for 1 year (CACHE_IMMUTABLE_PRIVATE)
- Public testimonials cache for 60 seconds (CACHE_SHORT_PUBLIC)
- All other routes default to no-store
@chrisjensen chrisjensen merged commit 9813aba into main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant