-
Notifications
You must be signed in to change notification settings - Fork 33
Route Caching #1245
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
base: main
Are you sure you want to change the base?
Route Caching #1245
Conversation
Added cache configuration for routes in astro.config.ts and updated cache invalidation tag in webhook API.
|
I’d like to see a summary of the total cache along with a list of tags, so we can get an idea of what’s being cached or invalidated and catch any tags that might have been missed which allows us to easily debug. |
|
I'm not sure that's something for Astro to provide, feels like maybe it should be achievable through the driver platform (eg. cloudflare)? |
|
Exclusively for self-hosted servers, these metrics (memory, SWR settings, etc.) are provided in JSON format. I think they could be useful for storefronts that need to cache product listings. Other ideas, can it cache payload in gzipped or brotli? Thinking by 50% or more is worth saving and reduce latency. |
|
My other thought is that if we could set a max memory limit, it might help prevent the server from starving or running out of memory when a malicious or heavy request comes in. Should it only cache those with HTTP respond code 200? https://example.com?test=1 |
Summary
A platform-agnostic route caching API for Astro SSR pages that enables declarative cache control using web standards.
Examples
Basic route caching
Automatic dependency tracking
Links