Read-Through Caching
NCache framework will use your custom read-through provider to communicate with the back-end data source. Here, you have to implement your custom logic to load data from the configured data source. NCache will call your provider to load data from the data source behind the get call, in case of a cache miss.
Note
NCache provides a performance counter for Read-Thru Operations per sec.
In clustered caches, where multiple servers are involved, read-through provider will be active (initialized) on all cache server nodes but read-through operations will be performed by the node which receives get operation according to the topology.
Warning
Do not make cache calls to the same cache for which Read-Through is configured. This can cause recursion and halt the normal working of cache.
In This Section
Configure Read-Through Provider
Explains the IReadThruProvider interface and provides a sample implementation for the interface.
Using Read-Through with Cache Operations
Provides samples to use Read-Through with basic and bulk operations in NCache.