Alachisoft NCache 4.1 - Online Documentation

DBCache Dependency

 
DBCacheDependency is used to keep cache items synchronized with any of the database. Prior to its use, you need to enable notifications for the underlying database. For details, see Using DB Cache Dependency For SQL Server , Using DB Cache Dependency For DB2 and Using DB Cache Dependency For Oracle . This is a row based dependency. The cache key is associated with the primary key value of the table. Thus an item expires only if the row with that primary key gets changed.
 
While using DBCacheDependency for SQL Server, you need to use 'Sql versions' of commands, connections, readers etc. available under 'System.Data.SqlClient' import statement in your client application. For Oracle and DB2, you need to use 'OleDb versions' of commands, connections, readers etc., available under 'System.Data.OleDb' import statement.
 
Following is the step-by-step guide for using DBCacheDependency. The example given is for SQL Server, however, Oracle and DB2 databases can also be used with little modifications.
 
 
See Also
 
Copyright © 2005-2012 Alachisoft. All rights reserved.