Alachisoft NCache 4.1 - Online Documentation

Write-through Cache Provider

 
NOTE: This feature is not available in NCache Express and Professional edition.
 
Namespace:
 
For enabling Write-through caching, you need reference of following assembly in your application:
Alachisoft.NCache.Runtime.dll
This assembly contains class implementing Alachisoft.NCache.Runtime.DatasourceProviders.IWriteThruProvider interface provided by NCache. The class implementing this interface gets notification requests to save data back to the master datasource whenever new data is added to the cache. Thus, the class needs to include the logic for writing data from cache to the master datasource.
Following namespaces are required in your project for using Write-Thru provider:
 
using Alachisoft.NCache.Web.Caching;
using Alachisoft.NCache.Runtime.DatasourceProviders;
using Alachisoft.NCache.Runtime;
 
Write-Through Interfaces:
 
In order to use Write-Thru/Write-Behind provider in your application, implement the following methods:
 
public void Start(System.Collections. IDictionary parameters);
public void Stop();
public bool AddToSource(string key, object value);
public System.Collections.Hashtable AddToSource(string[] keys, object[] vals);
public bool UpdateSource(string key, object value);
public System.Collections.Hashtable UpdateSource( string [] keys, object [] vals);
public bool RemoveFromSource(string key);
public System.Collections.Hashtable RemoveFromSource(string[] keys);
public bool Clear();
 
 
See Also

 
Copyright © 2005-2012 Alachisoft. All rights reserved.