Alachisoft NCache 4.1 - Online Documentation

Eviction Policies

 
There is a storage limit, maximum size is the capacity to which a cache can add objects in it. If cache reaches its maximum size and eviction is turned on, the specified ratio of items will be evicted, to make space for new objects. On the other hand, if cache reaches its maximum storage limit and eviction is turned off, items are neither evicted nor added to the cache any further.
An eviction scheme is used to select the objects that need to be removed from the cache. A particular eviction policy can be selected at the creation time but once it is set it cannot be altered in running cache. User can change eviction policy after creating a cache only if it is not running. Eviction policies for a cache can be specified in one of the following two ways.
 
NCache Manager:
 
You can select Eviction Policy for both Clustered and Local Cache from Policies Tab of their view window.
 
Config.ncconf:
 
You can select the Eviction Policy for a cache through Config.ncconf as follows.
 
<cache-config name="mypartitionedcache" inproc="False" config-id="1" last-modified="6/20/2010 3:50:34 PM">
<eviction-policy enabled="True" default-priority="normal" policy="priority" eviction-ratio="0.05"/>
</cache-config>
 
Note: Eviction-ratio=0.05 is equal to 5% of total cache size. Eviction is not recommended in case of sessions.
 
In This Section
Describes the LRU based scheme of eviction.
Describes LFU based eviction policy.
Describes eviction of an object based on its relative cost or priority.
 
See Also
Helps you in configuring Local Cache through NCache Manager.
 
Copyright © 2005-2012 Alachisoft. All rights reserved.