Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MemoryCacheEntryExtensions.RegisterPostEvictionCallback Method

Definition

Namespace:
Microsoft.Extensions.Caching.Memory
Assembly:
Microsoft.Extensions.Caching.Abstractions.dll
Package:
Microsoft.Extensions.Caching.Abstractions v11.0.0-preview.5.26302.115

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate)

Fires the given callback after the cache entry is evicted from the cache.

RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object)

Fires the given callback after the cache entry is evicted from the cache.

RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate)

Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs

Fires the given callback after the cache entry is evicted from the cache.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ RegisterPostEvictionCallback(Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ options, Microsoft::Extensions::Caching::Memory::PostEvictionDelegate ^ callback);
public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback);
static member RegisterPostEvictionCallback : Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions * Microsoft.Extensions.Caching.Memory.PostEvictionDelegate -> Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions
<Extension()>
Public Function RegisterPostEvictionCallback (options As MemoryCacheEntryOptions, callback As PostEvictionDelegate) As MemoryCacheEntryOptions

Parameters

callback
PostEvictionDelegate

The callback to register for calling after an entry is evicted.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to

RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object)

Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs
Source:
MemoryCacheEntryExtensions.cs

Fires the given callback after the cache entry is evicted from the cache.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ RegisterPostEvictionCallback(Microsoft::Extensions::Caching::Memory::MemoryCacheEntryOptions ^ options, Microsoft::Extensions::Caching::Memory::PostEvictionDelegate ^ callback, System::Object ^ state);
public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback, object? state);
static member RegisterPostEvictionCallback : Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions * Microsoft.Extensions.Caching.Memory.PostEvictionDelegate * obj -> Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions
<Extension()>
Public Function RegisterPostEvictionCallback (options As MemoryCacheEntryOptions, callback As PostEvictionDelegate, state As Object) As MemoryCacheEntryOptions

Parameters

callback
PostEvictionDelegate

The callback to register for calling after an entry is evicted.

state
Object

The state to pass to the callback.

Returns

The MemoryCacheEntryOptions so that additional calls can be chained.

Applies to


Feedback

Was this page helpful?