Software EngineeringArchitecture

Caching

Overview

Direct Answer

Caching is a technique that stores copies of frequently accessed data in a fast-access layer—such as memory, solid-state storage, or a dedicated cache server—to reduce retrieval latency and decrease load on origin data sources. This approach trades storage capacity for significant performance improvement in read-heavy workloads.

How It Works

When a request arrives, the system first checks the cache layer; if the data exists (a cache hit), it is returned immediately without accessing slower backend storage. On a miss, the system fetches data from the primary source, stores a copy in the cache according to a replacement policy, and returns it to the requester. Cache coherence strategies—such as time-to-live (TTL) expiration or invalidation signals—maintain consistency between the cache and source data.

Why It Matters

Reducing latency directly improves user experience and throughput in high-traffic systems, whilst decreasing backend load and operational costs. Organisations rely on caching to meet performance service-level agreements and to scale systems cost-effectively without proportional infrastructure investment.

Common Applications

Web browsers cache static assets; content delivery networks cache web pages; databases employ buffer pools and query result caches; in-memory stores like Redis cache application data; and CPU caches accelerate processor instruction execution. E-commerce platforms cache product catalogues; streaming services cache video metadata.

Key Considerations

Cache coherence complexity increases with distributed systems, and incorrect invalidation strategies can surface stale data. Memory-constrained environments require careful selection of eviction policies and cache sizing to avoid thrashing.

Referenced By1 term mentions Caching

Other entries in the wiki whose definition references Caching — useful for understanding how this concept connects across Software Engineering and adjacent domains.

More in Software Engineering