cachepatronen
Cachepatronen, in computing, are established designs for storing data in fast-access storage to improve performance and scalability. They describe when data should be cached, how it is refreshed, and how consistency with the primary data store is maintained. Caching can operate at multiple layers, including client-side memory, application servers, databases, and content delivery networks.
- Cache-aside (lazy loading): the application queries the cache first; on a miss, it loads from the
- Read-through: the cache itself handles misses by loading data from the data store and updating itself,
- Write-through: on write operations, data is written to both the cache and the underlying data store,
- Write-behind (write-back): writes are written to the cache and are persisted to the data store asynchronously,
- Refresh-ahead: the cache proactively refreshes entries before expiration to reduce the chance of serving stale data.
Key concepts also include expiration and eviction policies, such as TTL (time-to-live) and eviction schemes (LRU,
Common implementations include in-memory caches (Redis, Memcached) and CDN-based content caching. The choice of cachepatronen depends