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.
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.