Create Client Cache
The client cache is a cache thats exists on the client node. You can create a client cache in two ways described below.
If you are using NuGet packages without any NCache client installation, refer to Create Client Cache with NuGet Package Installation.
Ensure that you have an existing client node to create a client cache. To add a client node, please refer to the Add Client Node section.
Using the NCache Management Center
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251on Windows and Linux.
In the left navigation bar, click on Clustered Caches to which the client cache will be added. Against the cache name, click on View Details.
This opens the detailed configuration page for the cache.
In the Client Cache tab, click on the New button.
At this point, the New Client Cache page opens.
Specify the client cache name and synchronization mode. Click Next.
- Specify the isolation level for the client cache. The InProc cache lives inside the application process, whereas an OutProc cache lives in a separate service process. Click Next.
- Specify the maximum cache size. Click Next.
In the Advanced Options dialog box, you can configure the following:
You can change the Eviction Policy and Eviction Percentage; items will be evicted from the cache using the selected policy and percentage value, if eviction is enabled.
You can change the Clean Interval value. Its default value is 15 sec.
You can make the cache start automatically after a service restart by checking the checkbox "Auto start this cache on service startup".
You might receive a dialog box upon these changes, asking whether to reload or overwrite the cache config file. For more details on maintaining data integrity, refer to this chapter.
- This will prompt a success notification and the Client Cache tab will now show options to configure client cache settings.
Using Command Line Tools
The New Client Cache tool enables the user to create a new client cache.
This command creates a client cache demoClientCache for the cache demoCache with a cache size of 1024 MB.
New-ClientCache demoCache -ClientCacheName demoClientCache -Server 220.127.116.11 -ClientNode 18.104.22.168 -Size 1024