Alachisoft NCache 4.1 - Online Documentation

Create Client Cache

 
In NCache Manager, each clustered cache tree contains a node used for the creation of client cache called "Client Cache". Client Cache is just like a local/standalone cache but synchronized with a master/clustered cache. It gives further boost to the performance of those applications which are read intensive and/or read larger data. Client cache can only be created in a clustered environment if client nodes are already added in clustered cache. If user has not added or configured remote clients then he needs to do this first.
 
By right click on created node, a context menu will appear having an option of "Create New Cache" as shown below. Using this option you can create a client cache in a selected cluster. By default, client cache will be enabled on all the client nodes that appear in NCache Manager. But for the client nodes that are added to NCache Manager after creating client cache, users will have to enable the client cache separately on them.
 
Step 1
 
 
Step 2
 
On clicking "Create New Cache" option, "New Client Cache Wizard" will be launched for setting client cache properties. Wizard requires the following parameters:
 
  1. Enter the Name of a Client Cache.
  2. Select the mode of synchronization.
  3. Select Isolation level for the cache.
  4. Press Next button for further settings.
     
 
  • Optimistic Mode: With this mode client cache is synchronized with the clustered caches through events. It is possible that client caches are not synchronized with clustered cache for a small period of time. If during that time user gets an item from the client cache, he may get stale item. This is a default mode.
  • Pessimistic Mode: With this mode of synchronization, client cache always checks the "version" of cached item before returning it to the application.
  • Isolation Level: It specifies application isolation level. A High isolation level implies that the Cache runs in NCache service's process whereas a Low level implies that Cache is InProc to the applications. An OutProc cache can be shared between different applications on the same node. Moreover, an isolated cache's lifetime is explicitly controlled by applications like NCache Manager, Cmd Tools or API's.
 
Step 3
 
  1. Enter Maximum Size required for the client cache.
  2. Press Next button for further settings.
     
 
Maximum Size: Specifies an upper limit on the size of the cache in MB. When specifying max cache size, take into consideration the operating system, platform and the topology. In 32-bit Systems the total memory that an operating system can consume is limited by 4GB. Out of this, the operating system withholds 2GB for its own use and the remaining 2GB for the running processes. It is best to keep the cache size under 1.6GB. For Windows 2003/2008 server with 3GB switch, you should keep cache size under 2.4 GB. On 64-bit Windows platform, you should leave 2.6 GB for the operating system to avoid "out of memory" exceptions.
 
Step 4
 
  1. Select Eviction type.
  2. Enter Eviction Percentage.
  3. Enter Clean interval in seconds.
  4. Press Finish button to apply the changes.
     
 
The recommended values are already set on the page but you can change them according to the requirements.
  • Eviction Policy: Specifies the eviction policy to determine which items to be removed from cache, if it is full to accommodate new items.
  • Default Priority: Specifies default priority in case of Priority based eviction.
  • Eviction Percentage: Specifies the percentage of items to be removed on each eviction.
  • Clean Interval (sec.): The periodic interval after which expired items are removed from the cache.
  • Using “Start this cache on service startup” option, user will be able to mark the cache as a startup cache which will be started on cache service startup.
 
On finishing the above wizard, client cache will be created and enabled on all the client nodes that are already added in the cluster as shown in the figure below.
 
 
 
    See Also

 
Copyright © 2005-2012 Alachisoft. All rights reserved.