Try Playground
Show / Hide Table of Contents

Update Cache Configuration

NCache lets you change the cache configuration, but these changes will not be effective unless you restart the NCache Service.

Note

Caches other than the one that needs modifications don't need to be stopped for you to change cache configurations. Even when you restart the service, no other cache processes stop.

Step 1: Stop Cache on All Nodes

You need to stop the cache, in case it's running, on the local server (in case of local cache) and on all servers in case you use a clustered cache. Using PowerShell, you can stop the cache by using the following cmdlet.

Stop-Cache -CacheName demoCache

Step 2: Modify config.ncconf on All Nodes

The cache configuration must remain the same. For example, if you need to change the size of the cache from 1GB to 2GB, then you need to reflect this change for all cache server nodes. If this cache configuration is not identical for all cache server nodes, you might notice your cache behaving unpredictably.

Change the configurations in the config.ncconf file as per your requirements.

For instance, if you need to modify the size of a cache, you will have to update the config.ncconf of the local server machine in case of a local cache and all servers in case of a clustered cache.

You can specify the <cache-size> by updating the <storage> tag under the <cache-settings> tag.

<cache-config>
 <cache-settings ...>
    ...
    <storage type="heap" cache-size="1024mb"/>
    ...
 </cache-settings>
</cache-config>

Please refer to the section on Configure Cache Settings for more details on updating cache settings.

Step 3: Restart NCache Service on All Nodes

You will have to restart the NCache Service for the changes made in the configuration to take effect. To be able to restart the service, you need to have administrative privileges. Otherwise, you might get an error.

To restart the NCache Service, run the following command:

Restart-Service -Name NCacheSvc

Step 4: Start Cache on All Nodes

Start the cache on all servers once the cache configurations are updated. You can do this through a PowerShell command Start Cache.

Start-Cache -Name <cache-name>

See Also

Create a Cache
Remove Cache
Add Server Node
Remove Server Node

In This Article
  • Step 1: Stop Cache on All Nodes
  • Step 2: Modify config.ncconf on All Nodes
  • Step 3: Restart NCache Service on All Nodes
  • Step 4: Start Cache on All Nodes
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top