Notification Based Database Dependencies
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.
How it Works: In this type of database dependency, NCache uses data change
notifications provided by databases servers to invalidate cache data. Oracle
(10g or later) provides an event notification mechanism where the distributed
cache like NCache can register itself for change notification through
OracleDependency. NCache receives notifications from database whenever
underlying data changes occurs in the database. This allows NCache to
immediately invalidate or reload the corresponding cached item and this keeps
the cache always synchronized with the database.
In This Section
Database Dependency Using SQL Server
Explains how to use SQL dependency feature for the purpose of synchronizing cache with Microsoft SQL Server 2005/2008.
Database Dependency Using Oracle
Explains how to use Oracle dependency feature for the purpose of synchronizing cache with Oracle database.