ObjectCache.CreateCacheEntryChangeMonitor Method

When overridden in a derived class, creates a CacheEntryChangeMonitor object that can trigger events in response to changes to specified cache entries.

Namespace:  System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

public abstract CacheEntryChangeMonitor CreateCacheEntryChangeMonitor(
	IEnumerable<string> keys,
	string regionName
)

Parameters

keys
Type: System.Collections.Generic.IEnumerable<String>

The unique identifiers for cache entries to monitor.

regionName
Type: System.String

Optional. A named region in the cache where the cache keys in the keys parameter exist, if regions are implemented. The default value for the optional parameter is null.

Return Value

Type: System.Runtime.Caching.CacheEntryChangeMonitor
A change monitor that monitors cache entries in the cache.

When a derived ObjectCache class overrides the base CreateCacheEntryChangeMonitor method, the cache implementation must create a CacheEntryChangeMonitor object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the keys parameter. For example, if a monitored item in the keys parameter is updated or removed from the cache, the change monitor created by this method triggers an event.

If a cache implementation supports named cache regions, a string value can be specified as the regionName parameter. Otherwise, the parameter defaults to null.

NoteNote

Not all cache implementations support cache-entry change monitors. To determine whether your cache implementation supports CacheEntryChangeMonitor objects, see the documentation for the specific cache implementation.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft