Home


Priority

The priority sub-element is used to keep some cache entries in memory while evicting others when in memory cache is full. The priority value, a positive integer between 1 and 255, delays removing cache entries from the in memory cache. The least recently used (LRU) algorithm only removes items from the cache that have a priority of zero. When the cache runs out of storage space the LRU algorithm searches through the cache entries for those with a priority of zero, and evicts them from the cache to make space for new items. Each iteration of the LRU algorithm decrements the priority of currently cached elements by one, so that eventually even the highest priority item has a priority of zero and is evicted.

Example 3-6 Prioritizing cache entries

<cache-id>
  <component id="storeId" type="parameter">
    <required>true</required>
  </component>
  <component id="DC_userId" type="attribute">
    <required>true</required>
  </component>
  <priority>1</priority>
  <inactivity>240</inactivity>
  <timeout>3600</timeout>
</cache-id>

+

Search Tips   |   Advanced Search