If the amount of data cached in Redis is larger than the memory available to the in-memory cache then the data that is in the in-memory cache would be 'hot', in that it is frequently or recently used. If, in another process (for example, a pre-loader task), we start adding new data to our Redis cache then we will evict hot data from our in-memory cache, which could cause excessive cache misses. This could be a problem in multi-tenant applications or when an application uses a pre-loader to fill its cache.
When a cache update message is received instead of blindly adding it to our local cache we should check that the data is in our local cache before fetching and updating it.
I'm looking for some input on how this would look, and whether this would be a desired change or not. If you think so, I can write up a PR for it.
If the amount of data cached in Redis is larger than the memory available to the in-memory cache then the data that is in the in-memory cache would be 'hot', in that it is frequently or recently used. If, in another process (for example, a pre-loader task), we start adding new data to our Redis cache then we will evict hot data from our in-memory cache, which could cause excessive cache misses. This could be a problem in multi-tenant applications or when an application uses a pre-loader to fill its cache.
When a cache update message is received instead of blindly adding it to our local cache we should check that the data is in our local cache before fetching and updating it.
I'm looking for some input on how this would look, and whether this would be a desired change or not. If you think so, I can write up a PR for it.