Does Fiber Cache middleware support granular key invalidation?
0 reputation · 10 Oct 2021, 18:53 UTC
The Fiber web framework provides a built-in Cache middleware designed to store route responses in memory based on a defined Time-to-Live (TTL). This mechanism reduces processing overhead by returning cached byte slices for identical requests until the expiration timer is reached.
In scenarios where underlying data changes before the TTL expires, the middleware continues to serve stale content. While the current implementation manages expiration automatically, there is a need to understand the capabilities for manual cache management without resetting the entire store.
- What is the standard approach for programmatically purging a specific cached route in Fiber v2?
- Does the middleware provide a mechanism to invalidate individual keys based on request parameters or headers?