Cache penetration occurs when requests for non-existent data bypass the cache and repeatedly hit your database.
Bloom filter solution:
A Bloom filter is a probabilistic data structure that tells you if a key definitely does not exist. Check the filter before querying the database.
- Space efficient: ~ bits per element
- False positive rate: ~% is typical
- No false negatives: if filter says no, key definitely missing
Alternative: cache null values with short TTL (negative caching).