Create a Local/Clustered Cache
NCache Professional edition allows you to create the following caches:
- Local Cache (meaning a standalone cache)
- Partitioned Cache
- Replicated Cache
For other caching topologies, please download and use NCache Enterprise. See more details on edition comparison between NCache Professional and Enterprise.
We'll create a Partitioned Cache here.
Make sure NCache Service is started. If it is not started, type the following command in PowerShell:
> sudo systemctl start ncached
Create New Cache
New-Cache PowerShell cmdlet enables the user to create a new cache on one or more server nodes. In PowerShell, execute the following command to create a new partitioned cache named demoClusteredCache on server 220.127.116.11, with default configurations.
Cache with the specified name should not exist on the server; otherwise you get an error message that this cache already exists on this server.
New-Cache -Name demoClusteredCache -Server 18.104.22.168 -Size 1024 –Topology Partitioned
To start the cache, please type the following command in PowerShell:
Start-Cache –Name demoClusteredCache
Successful cache start will be prompted on the screen.
Verify Successful Cache Creation
To verify that you’ve created the cache successfully, please type the following command in PowerShell:
This command gives a detailed status of all caches registered on the cache server. You should see that demoClusteredCache has a Cluster-size of 1 with IP address of the cache server listed with it. The output also displays the Item Count, which at this stage should be 0.