Data in the cache can have dependency relations with items like a file on some location, a record in a database, results of a particular query or another cached item, such that any change in the item can invalidate the data in the cache. In that case, all dependent data must be reloaded or removed from cache otherwise data will become stale.
Expiration in Clustered Environment
In a clustered cache environment where multiple caching servers are involved, expiration is handled differently in various NCache topologies. In replicated cache, expiration is performed by coordinator node and the operation will then be synchronized to other clustered nodes. In partitioned topology, as data is distributed on separate nodes, each node is responsible for its own item expiration. For partitioned-replicated topology, expiration will be performed on active nodes and propagate to their respective replicas. Similarly in mirrored topology, active node will perform expiration and synchronize it on passive node.
In This Section
Explains how to add data using key dependency.
Explains how to add data using file dependency.
Notification Based Database Dependencies
Explains how to use database dependency for the purpose of synchronizing cache with database.
Polling Based Dependency
Explains how to use polling based dependency to synchronize cache with databases who do not provide notifications feature.
Custom Data Source Dependency
Explains how the user can write his own dependency scenarios and use the feature of custom dependency.
Aggregate Cache Dependency
Explains how to add multiple dependencies with a single cache item.
Multiple Cache Sync Dependency
Explains how to synchronize data among different caches to ensure data integrity.
Add Dependency to Existing Item
Explains how cache dependency can be added to an existing item without any need to update it.
Using CLR Procedures to Call NCache
Explains how to write CLR stored procedures for database to synchronize cache with the database.