I've been looking into the cache providers and it appears that different implementations will not behave the same for the query cache.
The sys cache provider Builds the named cache regions at session factory startup and stores the caches in a static hashtable. Then if a query is set as cacheable and a region is set, the StandardQueryCache will attempt to build the cache, but if a cache with the same name has already been built, it will use the existing one. This appears to be the desired behavior.
However, the mem cached provider does not store a static list of the already built cache regions. When the standard query cache attempts to build a named cache region, it will create a new cache. So you could potentially end up with caches with the same region name. Atleast thats how it looks from the code.
Any thoughts on this?
|