I am working on a requirement to cache some database values, that can be reused. But I want the cache to be accessible to all the processor in the same server.
Overview:
So basically, there will be multiple processors that get work from an API and process the record to the database. Some of these database values will be cached.
The processors will be multiple windows services and I want them to share the same cache. How can this be achieved using Ncache. I am pretty new to using this. So any links or directions are greatly appreciated.
The biggest value to NCache is that is can be used as an
OutProcdistributed in-memory cache, where the cache resides within the NCache process itself; this differs from anInProccache where access would be limited to a single process.You need to configure an
OutProccache running on either a separate dedicated caching server (or cluster) or on the same server as your services.Refer to http://www.alachisoft.com/resources/docs/ncache/admin-guide/local-cache.html for more information on
OutProcandInProccaches.Once you install the NCache server, you can create your caching configuration by modifying the
config.ncconffile that by default lives atC:\Program Files\NCache\config.The above configuration will create an
OutProccache on the local server (seecache-topology). This can be configured as a various mirrored, partitioned, or replicated caches in a clustered environment if needed (refer to http://www.alachisoft.com/resources/docs/ncache/admin-guide/cache-topologies.html).You can then start the
NCacheservice, and connect to the service from within your application, and initialize connection to the named cache instance in the configuration above.You can also configure the connection to the
NCacheserver/service entirely within the code instead of aclient.ncconffile by sending configuration parameters to theInitializeCachemethod above.