## Notes [Cache Systems - YouTube](https://www.youtube.com/watch?v=dGAgxozNWFE) - CPU caches - L1 cache: fastest, built into the CPU - L2: second fastest, located on the CPU die or separate chip - L3: shared between multiple cores - TLB (Translation Lookaside Buffer): stores common hardware-virtual addresses - OS caches - Page cache: stored in main memory and managed by OS, stores reads from disk - File system caches - UI - Web browsers can store HTTP responses; HTTP responses have an expiration date - CDN - For static content when content is stored in different servers around the world - Load balancer - Can cache responses - [[Kafka]] - Can cache messages - [[Redis]] - Distributed cache that stores key-value pairs - [[ElasticSearch]] - Can index documents based on commonly searched words - Relational database - WAL: write-ahead log for storing transaction history before b-tree - Buffer pool: cache query requests - Materialized views: Precomputes query results for faster performance - Transaction log: Records all transactions/updates - Replication log: Tracks replication state in a DB cluster