How to Auto Start Cache

NCache provides you with the feature to automatically start your cache at NCache service startup. For example, you have a running three-node cache cluster. For some reason, one of the machines from the cache cluster restarts (planned or unplanned). When this happens, that machine will leave the cache cluster and you’ll manually have to start that node when it comes back online. Manual steps are not a good idea in production environments and you can end up running your cache with less capacity until this step is taken.

The auto-start cache option feature resolves this problem by automatically starting your caches when the host machine restarts. By default, the auto-start cache option is disabled. You can enable/disable this option using the NCache Web Manager in the following ways:

Enable Auto Start at Cache Creation

NCache Web Manager is shipped with NCache Enterprise and Professional editions. You can launch/access the NCache Web Manager through your web browser via the 8251 port on the localhost. To enable automatic cache(s) start on service startup at the time of cache creation, follow the steps below:

  • Launch the NCache Web Manager.
  • Create a cache.
  • On the 6th step, check the Auto start this cache on service startup option as shown below:
Figure 1: Auto-start cache on service startup option at cache creation
Figure 1: Auto-start cache on service startup option at cache creation

Enable Auto Start for Created Caches

You can also enable/disable the auto-start cache on the service startup option for caches that have been already created. Just follow the steps below:

  • In the NCache Web Manager, click on Clustered Caches or Local Caches from the left navigation bar based on your preference.
  • Against the cache name, click on View Details.
  • Figure 2: NCache Web Manager
    Figure 2: NCache Web Manager
  • On the overview page, click on the Edit button.
  • Check the Auto Start Cache on Service Startup checkbox.
  • Figure 3: NCache Web Manager cache overview settings
    Figure 3: NCache Web Manager cache overview settings
  • Click on Save to save the cache configuration.

Verify Configurations for Auto-Start feature

You can also verify if the auto-start feature is enabled/disabled through configuration files shipped with NCache installation. This is done by following the steps below:

  • Open the config.ncconf file, which is located at %NCHOME%config.
  • Check the auto-start property of the cache-settings tag and see if it is set to True
  • <cache-config ...>
    <cache-settings auto-start="True" ...>
    </cache-config>

Verify Cache Auto-Start

You can verify if your cache automatically starts on machine restart by following these steps below:

  • Restart your machine.
  • Launch PowerShell as an Administrator
  • Execute the following PowerShell command to check if your cache(s) is running or not:
    Get-Caches
  • You can also verify through the NCache Web Manager by looking at the running status of your cache cluster.

What to Do Next?

Signup for monthly email newsletter to get latest updates.

© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.