NCache supports time-based data invalidation where you can specify the time or interval to expire your cache data. NCache maintains an index for items with time based expiration. A dedicated thread checks cache data for these expired items periodically after a configurable interval of time called Clean Interval. Clean interval is the periodic interval after which the expired items are removed from the cache. By default, expiration Clean-Up interval is 15 seconds.
You can manually edit config.ncconf and client.ncconf located at %NCHOME%/config. %NCHOME% is NCache install directory. These files can be edited through any text editor of your choice.
In case you want to update any cache settings please refer to the Update Cache Config section to follow the set of steps.
Specify cleanup interval and expiration policy through config.ncconf file located at %NCHOME%\config.
%NCHOME% is NCache install directory. In config.ncconf of EACH server specify the
<cleanup> tag in the
The following example sets default absolute expiration to true, and its value to 30 seconds.
<cache-config> <cache-settings ... > <expiration-policy enabled="True"> <absolute-expiration longer-enabled="False" longer-value="0"/> <sliding-expiration longer-enabled="False" longer-value="0"/> </expiration-policy> <cleanup interval="15sec"/> </cache-settings> </cache-config>
enabled: Enables the expiration policy.
longer-enabled: Specifies whether Longer expiration is enabled. If true, the value should be provided.
longer-value: If longer-enabled is true, the value should be provided under this tag. If no value is provided here and default-longer is enabled, the default value of 10 seconds will be used.
cleanup-intervalis the periodic interval after which the expired items are removed from the cache. By default, its value is 15 seconds.
For more detail about the expiration strategies, see the Data Expiration section.
Repeat this step for all server nodes.