IMemoryCache IMemoryCache IMemoryCache IMemoryCache Interface

Definition

Represents a local in-memory cache whose values are not serialized.

public interface class IMemoryCache : IDisposable
public interface IMemoryCache : IDisposable
type IMemoryCache = interface
    interface IDisposable
Public Interface IMemoryCache
Implements IDisposable
Derived
Implements

Methods

CreateEntry(Object) CreateEntry(Object) CreateEntry(Object) CreateEntry(Object)

Create or overwrite an entry in the cache.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
Remove(Object) Remove(Object) Remove(Object) Remove(Object)

Removes the object associated with the given key.

TryGetValue(Object, Object) TryGetValue(Object, Object) TryGetValue(Object, Object) TryGetValue(Object, Object)

Gets the item associated with this key if present.

Extension Methods

Get(IMemoryCache, Object) Get(IMemoryCache, Object) Get(IMemoryCache, Object) Get(IMemoryCache, Object)
Get<TItem>(IMemoryCache, Object) Get<TItem>(IMemoryCache, Object) Get<TItem>(IMemoryCache, Object) Get<TItem>(IMemoryCache, Object)
GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>) GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>) GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>) GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>)
GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>)
Set<TItem>(IMemoryCache, Object, TItem) Set<TItem>(IMemoryCache, Object, TItem) Set<TItem>(IMemoryCache, Object, TItem) Set<TItem>(IMemoryCache, Object, TItem)
Set<TItem>(IMemoryCache, Object, TItem, MemoryCacheEntryOptions) Set<TItem>(IMemoryCache, Object, TItem, MemoryCacheEntryOptions) Set<TItem>(IMemoryCache, Object, TItem, MemoryCacheEntryOptions) Set<TItem>(IMemoryCache, Object, TItem, MemoryCacheEntryOptions)
Set<TItem>(IMemoryCache, Object, TItem, IChangeToken) Set<TItem>(IMemoryCache, Object, TItem, IChangeToken) Set<TItem>(IMemoryCache, Object, TItem, IChangeToken) Set<TItem>(IMemoryCache, Object, TItem, IChangeToken)
Set<TItem>(IMemoryCache, Object, TItem, DateTimeOffset) Set<TItem>(IMemoryCache, Object, TItem, DateTimeOffset) Set<TItem>(IMemoryCache, Object, TItem, DateTimeOffset) Set<TItem>(IMemoryCache, Object, TItem, DateTimeOffset)
Set<TItem>(IMemoryCache, Object, TItem, TimeSpan) Set<TItem>(IMemoryCache, Object, TItem, TimeSpan) Set<TItem>(IMemoryCache, Object, TItem, TimeSpan) Set<TItem>(IMemoryCache, Object, TItem, TimeSpan)
TryGetValue<TItem>(IMemoryCache, Object, TItem) TryGetValue<TItem>(IMemoryCache, Object, TItem) TryGetValue<TItem>(IMemoryCache, Object, TItem) TryGetValue<TItem>(IMemoryCache, Object, TItem)

Applies to