topics / data-caching
Bloom Filter
A HashSet of every key won't fit in RAM, and asking the disk costs a seek every time, even for keys that aren't there. A Bloom filter answers “definitely not” from a few bits of memory, so the disk only hears about keys that might exist.
Event log
Waiting for traffic…
Keys
Leave the box blank and Insert adds a random user:NNNNN, while Check asks about one that was never inserted. Click a recent key to check it again.
Filter shape
Changing either one rebuilds the filter from the stored keys — a real Bloom filter can't be resized in place.
Stress it
Every one of these is a negative lookup. Count how many the filter turns away before they reach the disk.
Keeps inserting until 90% of the bits are 1. Then query absent keys again and watch false positives leak through.
Try to delete
Clears the key's k bits back to 0. With the box blank, it picks the stored key that shares the most bits with others. Any key that relied on one of those bits now gets a false negative.