Database
What is Caching?
Storing frequently accessed data in a fast-access layer to reduce load and improve performance.
Definition
Caching stores copies of data in a faster storage layer so future requests can be served quickly. Types include: Browser cache (HTTP cache headers), CDN cache (edge locations), Application cache (Redis, Memcached), Database query cache. Cache strategies include cache-aside (lazy loading), write-through, write-behind, and read-through. Key challenges are cache invalidation and ensuring data consistency.