Hacker News new | ask | show | jobs
by Elucalidavah 469 days ago
> need to listen to the DB for events

You could store the key->version separately, and read the said version. If the cached version is lower, it's a cache miss.

Of course, evicting something from cache (due to memory constraints) is a bit harder (or less efficient) in such setup.