PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​ImplementationCaching­BackendOn­Item­Removed
Open sandboxFocus

CachingBackend.OnItemRemoved Method

OnItemRemoved(CacheItemRemovedEventArgs)

Raises the ItemRemoved event given a CacheItemRemovedEventArgs.

Declaration
protected void OnItemRemoved([Required] CacheItemRemovedEventArgs args)
Parameters
Type Name Description
CacheItemRemovedEventArgs args

Event arguments.

OnItemRemoved(String, CacheItemRemovedReason, Guid)

Raises the ItemRemoved event, but lazily instantiates the CacheItemRemovedEventArgs if there is an event client.

Declaration
protected void OnItemRemoved([Required] string key, CacheItemRemovedReason reason, Guid sourceId)
Parameters
Type Name Description
String key

The key of the removed cache item.

CacheItemRemovedReason reason

The reason of the removal.

System.Guid sourceId

The System.Guid of the CachingBackend instance that removed the item,. or Empty if the source CachingBackend cannot be determined.