Open sandboxFocus

Method AddDependency

AddDependency(ICachingService, string)

Adds a string dependency to the current caching context, so that the cached item will be invalidated when this dependency is invalidated.

Declaration
public static void AddDependency(this ICachingService cachingService, string key)
Parameters
Type Name Description
ICachingService cachingService

The ICachingService.

string key

The dependency key.

AddDependency(ICachingService, ICacheDependency)

Adds an ICacheDependency to the current caching context, so that the cached item will be invalidated when this dependency is invalidated.

Declaration
public static void AddDependency(this ICachingService cachingService, ICacheDependency dependency)
Parameters
Type Name Description
ICachingService cachingService

The ICachingService.

ICacheDependency dependency

The dependency to add.