Glossary coding Term Page
Cache Hit
Successful cache lookup that avoids touching the original data source.
Core Idea
A cache hit means the cache key matches existing data, so the response can return immediately. Hits keep latency predictable and reduce load on databases or APIs. Tracking hit ratios helps decide whether cache size, eviction, or TTL tuning works.
Why It Matters Here
FastAPI lessons compare cache hits from lru_cache to hits backed by a shared Redis cache. Recognizing a hit vs. miss lets you log, alert, and tweak policies before scaling traffic.