Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​Extensions.​Caching.​Memory.​IMemoryCache

Assembly: Microsoft.Extensions.Caching.Abstractions

Implemented Interfaces

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

Methods

CreateEntry​(object key)
Create or overwrite an entry in the cache.
Returns The newly created <see cref="T:Microsoft.Extensions.Caching.Memory.ICacheEntry" /> instance.
key An object identifying the entry.
void
Remove​(object key)
Removes the object associated with the given key.
key An object identifying the entry.
bool
TryGetValue​(object key, System.​Object&? value)
GetCurrentStatistics​()
Gets a snapshot of the cache statistics if available.
Returns An instance of <see cref="T:Microsoft.Extensions.Caching.Memory.MemoryCacheStatistics" /> containing a snapshot of the cache statistics.