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
Gets the value associated with this key if present.
Get<TItem>(IMemoryCache, Object)Gets the value associated with this key if present.
GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>, MemoryCacheEntryOptions)Gets the value associated with this key if it exists, or generates a new entry using the provided key and a value from the given factory if the key is not found.
GetOrCreate<TItem>(IMemoryCache, Object, Func<ICacheEntry,TItem>)Gets the value associated with this key if it exists, or generates a new entry using the provided key and a value from the given factory if the key is not found.
GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>, MemoryCacheEntryOptions)Asynchronously gets the value associated with this key if it exists, or generates a new entry using the provided key and a value from the given factory if the key is not found.
GetOrCreateAsync<TItem>(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>)Asynchronously gets the value associated with this key if it exists, or generates a new entry using the provided key and a value from the given factory if the key is not found.
Set<TItem>(IMemoryCache, Object, TItem, MemoryCacheEntryOptions)Sets a cache entry with the given key and value and apply the values of an existing MemoryCacheEntryOptions to the created entry.
Set<TItem>(IMemoryCache, Object, TItem, IChangeToken)Sets a cache entry with the given key and value that will expire when IChangeToken expires.
Set<TItem>(IMemoryCache, Object, TItem, DateTimeOffset)Sets a cache entry with the given key and value that will expire in the given duration.
Set<TItem>(IMemoryCache, Object, TItem, TimeSpan)Sets a cache entry with the given key and value that will expire in the given duration from now.
Set<TItem>(IMemoryCache, Object, TItem)Associate a value with a key in the IMemoryCache.
TryGetValue<TItem>(IMemoryCache, Object, TItem)Tries to get the value associated with the given key.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4