• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Class AggregateCacheDependency

Combines multiple dependencies between an item stored in a distributed cache
and an array of CacheDependency objects. This class cannot be inherited.

Inheritance
System.Object
CacheDependency
AggregateCacheDependency
Inherited Members
CacheDependency.AddDependencies(CacheDependency[])
CacheDependency.Dependencies
CacheDependency.Dispose()
CacheDependency.DependencyDispose()
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public sealed class AggregateCacheDependency : CacheDependency, IDisposable
Remarks

The AggregateCacheDependency class monitors a collection of dependency objects so that when any of them changes, the cached item is automatically removed. The objects in the array can be CacheDependency objects, DBCacheDependency objects or any combination of these.

The AggregateCacheDependency class differs from the CacheDependency class in that it allows you to associate multiple dependencies of different types with a single cached item. For example, if you create a page that imports data from a SQL Server database table and an XML file, you can create a SqlCacheDependency object to represent a dependency on the database table and a CacheDependency to represent the dependency on the XML file. Rather than making a Cache.Insert method call for each dependency, you can create an instance of the AggregateCacheDependency class with each dependency added to it. You can then use a single Insert call to make the page dependent on the AggregateCacheDependency instance.

Constructors

Name Description
AggregateCacheDependency()

Initializes a new instance of the AggregateCacheDependency class that wraps multiple CacheDependency objects.

Methods

Name Description
Add(CacheDependency[])

Adds an array of CacheDependency objects to the AggregateCacheDependency object.

Back to top Copyright © 2017 Alachisoft