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.
Important
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.
Creating Client Cache Using the NCache Management Center
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251
on 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 selecting the checkbox "Auto start this cache on service startup".
Click Next.
Note
You might receive a dialog box upon these changes, asking whether to reload or overwrite the cache config file.
- This will prompt a success notification and the Client Cache tab will now show options to configure client cache settings.
Creating Client Cache 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 -CacheName demoCache -ClientCacheName demoClientCache -Server 20.200.20.40 -ClientNode 20.200.20.38 -Size 1024
Note
You can change client cache settings/configurations using the Client Cache tab after creating it (where you can enable email alerts, error logging, compression, synchronization, and more for the client cache), or you can choose to View Details for that particular client cache from the Local Caches screen.
See Also
Enable Client Cache on Client Nodes
Disable Client Cache on Client Nodes
Remove Client Cache
Management Operations