Strategy ONE
Cache Priority Queues
The cache manager maintains two last recently used (LRU) queues, one for high-priority caches and one for low-priority caches.
For MicroStrategy versions prior to 11.0 cache manager maintains only one LRU queue for the caches. If the cache pool becomes full, the least-recently-used cache would be swapped out to free memory.
The following are the pre-defined priority for different caches generated under different circumstances:
Cache Type | Priority |
---|---|
All traditional document cache | High |
Page cache that has no manipulation saved as a cache key | High |
Page cache generated by a cache update subscription | High |
Page cache generated when a bookmark is opened | High |
Page cache generated on the fly and has manipulations saved as a cache key | Low |
If a low-priority cache is hit by a bookmark, the priority will be updated from Low to High.
There is a soft limit of 20% of the cache pool for low-priority caches. This is to avoid low-priority caches not being generated if there are too many high-priority caches filling up the cache pool.
When a new cache is going to be generated, if the cache pool is not full, the cache can be generated successfully. If the cache pool is full, the cache-swapping logic is triggered. If the low-priority caches already occupy more than 20% of the cache pool, then they will be deleted until the total low-priority cache size is equal to or below the limit. If the new cache still needs more memory, the high-priority caches will be swapped out to free up more memory, until the new cache can be generated.