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
Unit Testing
Quality & TestingTesting individual components or functions in isolation to verify they produce the expected output.
Memory Leak
Paradigms & PatternsA type of resource leak where a program fails to release memory that is no longer needed.
Domain-Driven Design
Paradigms & PatternsA software design approach focusing on modelling the business domain and aligning code with business logic.
Technical Documentation
Paradigms & PatternsWritten materials describing the architecture, design, APIs, and usage of software systems.
WebSocket
Paradigms & PatternsA communication protocol providing full-duplex communication channels over a single persistent TCP connection.
End-to-End Testing
Quality & TestingTesting the complete application workflow from start to finish to ensure the system meets requirements.
Queue System
Paradigms & PatternsA data structure and infrastructure for managing asynchronous task processing and inter-service communication.
SOLID Principles
Paradigms & PatternsFive principles of object-oriented design promoting maintainable, flexible, and understandable code.