Alachisoft NCache 4.1 - Online Documentation

How to do NCache Version Upgrades?

NCache major version can be upgraded by few simple steps given below:
1. Create Backup of config.ncconf (Optional)
If you are upgrading major version of the NCache then in order to restore old configurations you need to create a backup of config.ncconf file but it is recommended to use new configuration settings in case of major version upgrade. Also refer back to the backup config.ncconf file to see what options you have already configured in order to have exactly same configuration settings again. Backup of log files can also be kept for history purpose.
2. Uninstall NCache
Uninstall current version of NCache. If any application is using NCache and you uninstall NCache then, an error message will be displayed as shown below.
Here you have to remove assemblies by yourself
  1. Remove .NET Framework 2.0 assemblies manually from [System Drive]:\Windows\assembly
  2. Remove .NET Framework  4.0 assemblies from [SystemDrive]:\Windows\Microsoft.NET\assembly
  1. For NCache 3.8 remove assemblies manually e.g.
1. [SystemDrive]:\Windows\Microsoft.NET\assembly\GAC_32\Alachisoft.NCache.Web\ v4.0_3.8.0.0__cff5926ed6a53769\Alachisoft.NCache.Web.dll
2. [SystemDrive]:\Windows\Microsoft.NET\Assembly\GAC_64\Alachisoft.NCache.Web\v4.0_3.8.0.0__cff5926ed6a53769\Alachisoft.NCache.Web.dll
b. For NCache 4.1 and above remove assemblies manually from [SystemDrive]:\Windows\Microsoft.NET\assembly\GAC_MSIL e.g.
1. [SystemDrive]:\Windows\Microsoft.NET\Assembly\GAC_MSIL\Alachisoft.NCache.Web\v4.0_4.1.0.0__cff5926ed6a53769\Alachisoft.NCache.Web.dll
3. Install New Version
Install new version of NCache. For complete step by step installation process see installation guide.
4. Verification
After installation you can verify whether NCache has been installed correctly or not by using some command line tools such as:
Startcache mycache It will start default shipped cache ‘mycache’.
Addtestdata mycache It will add 10 items in the cache ‘mycache’, if cache is already started.
Getcachecount mycache It will return the number of total item exist in cache i.e. ‘mycache’.
Listcaches It will show all the created caches on current machine.
5. Upgradeconfiguration Tool (Optional)
For restoring previous configuration settings use command line tool "upgradeconfiguration.exe". Use of this tool is useful only when you want to use previous configuration settings otherwise it is not required.
You can also bind NCache service to specific IP that is publicly available to other nodes in the cluster. For details see Select Network Interface Card.
6. Recompile Application
If you are using object caching then you have to recompile your application. And if you are using view state caching or session state caching then you may have to change version manually from web.config file, generally their versions are not changed. But still it can be changed from web.config file For Example:
<add assembly="Alachisoft.NCache.SessionStoreProvider, Version=x.x.x.x, Culture=neutral, PublicKeyToken=CFF5926ED6A53769"/>
    Replace Version “x.x.x.x” with the NCache version that you have just installed.
Similarly, if you are using NCache SessionStore provider module or content optimization feature then you need to follow the same process. Find “Alachisoft.NCache.*” and change “version=x.x.x.x” with the current version of the NCache module in use.
Note: NCache module version can be different from the NCache version e.g. NCache current release version is “” but its ContentOptimization module version is “”.
See Also
Copyright © 2005-2012 Alachisoft. All rights reserved.