Try Playground
Show / Hide Table of Contents

Class CacheDependency

Tracks cache dependencies, which can be files, directories, or keys to other objects in application's cache. This class cannot be inherited.

Inheritance
System.Object
CacheDependency
AggregateCacheDependency
CustomDependency
DBCacheDependency
ExtensibleDependency
FileDependency
KeyDependency
NosDBDependency
OracleCacheDependency
SqlCacheDependency
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Obsolete("This API is deprecated and will be removed in a future release. This feature is being retired and will not be continued in future versions.", false)]
public class CacheDependency : IDisposable, IBinaryProtocolSerializable
Remarks

You can add items with dependencies to your application's cache with the Add and Insert methods.

When you add an item to an application's cache object and, in doing so, define a cache dependency for that item, an instance of the CacheDependency class is created automatically to track changes to the files, keys, or directories you have specified. This helps you avoid losing changes made to the object between the time it is created and the time it is inserted into the cache. The CacheDependency instance can represent a single file or directory, an array of files or directories, or an array of files or directories along with an array of cache keys (these represent other items stored in the cache object).

Constructors

Name Description
CacheDependency()

Default constructor for CacheDependency class.

CacheDependency(CustomDependency)

Creates a CacheDependency instance from Custom Dependency.

CacheDependency(ExtensibleDependency)

Creates a CacheDependency instance from Extensible Dependency.

CacheDependency(String)

Initializes a new instance of the CacheDependency class that monitors a file or directory for changes.

CacheDependency(String, DateTime)

Initializes a new instance of the CacheDependency class that monitors a file or directory for changes and indicates when change tracking is to begin.

CacheDependency(String[])

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories) for changes.

CacheDependency(String[], DateTime)

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories) for changes and specifies a time when change monitoring begins.

CacheDependency(String[], String[])

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories), an array of cache keys, or both for changes.

CacheDependency(String[], String[], CacheDependency)

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories), an array of cache keys, or both for changes. It also makes itself dependent upon a separate instance of the CacheDependency class.

CacheDependency(String[], String[], CacheDependency, DateTime)

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories), an array of cache keys, or both for changes. It also makes itself dependent upon another instance of the CacheDependency class and a time when the change monitoring begins.

CacheDependency(String[], String[], DateTime)

Initializes a new instance of the CacheDependency class that monitors an array of file paths (to files or directories), an array of cache keys, or both for changes.

Fields

Name Description
DEPENDENCY_COUNT_OVERHEAD
DEPENDENCY_TYPE_OVERHEAD
sizeInBytes

Properties

Name Description
Dependencies

Contains the list of dependencies for the cache item.

Methods

Name Description
AddDependencies(CacheDependency[])

This method is used to add dependencies for the cache item.

DependencyDispose()

Releases custom resources used by the CacheDependency object.

Dispose()

Releases the resources used by the CacheDependency object.

In This Article
  • Constructors
  • Fields
  • Properties
  • Methods

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
� Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top