Sync Cache with Database
Nowadays, most of the applications that heavily use database calls are incorporating distributed caching to the cache-expensive query result set, which helps to boost application performance and scalability. For this purpose, you would like that whenever any data changes occur in the database, cache data should be invalidated and removed from the cache. NCache provides a mechanism where data can be invalidated when changes occur in the database in real time. To cater to this problem, notification based database dependencies are provided in NCache.
Working of Database Dependencies
In database dependency, NCache uses data change notifications provided by database servers to invalidate cache data. NCache receives notifications from database whenever underlying data changes occurs in the database. This allows NCache to immediately invalidate the corresponding cached item and this keeps the cache always synchronized with the database.
In This Section
Sync Cache with SQL Server
Explains how to use SQL dependency feature for the purpose of synchronizing cache with Microsoft SQL Server 2005/2008.
Sync Cache with Oracle
Explains how to use Oracle dependency feature for the purpose of synchronizing cache with Oracle database.
Sync Cache with OleDb
Explains how to use OleDb dependency feature for the purpose of synchronizing cache with OleDb.
Using CLR Procedures in SQL Server
Explains how to write CLR stored procedures for database to synchronize cache with the database.