Microsoft.Extensions.Caching.Memory
11 wrapped types. Load them with using { "Microsoft.Extensions.Caching.Memory" }. Click a class to open it.
CacheEntryExtensions class static
Microsoft.Extensions.Caching.Memory.CacheEntryExtensions · assembly Microsoft.Extensions.Caching.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
AddExpirationToken | AddExpirationToken(p1,p2) | static ICacheEntry AddExpirationToken(ICacheEntry entry, IChangeToken expirationToken) |
RegisterPostEvictionCallback | RegisterPostEvictionCallback([ :entry = …, :callback = … ])RegisterPostEvictionCallback([ :entry = …, :callback = …, :state = … ]) | static ICacheEntry RegisterPostEvictionCallback(ICacheEntry entry, PostEvictionDelegate callback)static ICacheEntry RegisterPostEvictionCallback(ICacheEntry entry, PostEvictionDelegate callback, object state) |
SetAbsoluteExpiration | SetAbsoluteExpiration(p1,p2) | static ICacheEntry SetAbsoluteExpiration(ICacheEntry entry, TimeSpan relative)static ICacheEntry SetAbsoluteExpiration(ICacheEntry entry, DateTimeOffset absolute) |
SetOptions | SetOptions(p1,p2) | static ICacheEntry SetOptions(ICacheEntry entry, MemoryCacheEntryOptions options) |
SetPriority | SetPriority(p1,p2) | static ICacheEntry SetPriority(ICacheEntry entry, CacheItemPriority priority) |
SetSize | SetSize(p1,p2) | static ICacheEntry SetSize(ICacheEntry entry, long size) |
SetSlidingExpiration | SetSlidingExpiration(p1,p2) | static ICacheEntry SetSlidingExpiration(ICacheEntry entry, TimeSpan offset) |
SetValue | SetValue(p1,p2) | static ICacheEntry SetValue(ICacheEntry entry, object value) |
CacheExtensions class static
Microsoft.Extensions.Caching.Memory.CacheExtensions · assembly Microsoft.Extensions.Caching.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Get | @Get(p1,p2) | static object Get(IMemoryCache cache, object key)static TItem Get<TItem>(IMemoryCache cache, object key) |
GetOrCreate | GetOrCreate([ :cache = …, :key = …, :factory = … ])GetOrCreate([ :cache = …, :key = …, :factory = …, :createOptions = … ]) | static TItem GetOrCreate<TItem>(IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory)static TItem GetOrCreate<TItem>(IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory, MemoryCacheEntryOptions createOptions) |
GetOrCreateAsync | GetOrCreateAsync([ :cache = …, :key = …, :factory = … ])GetOrCreateAsync([ :cache = …, :key = …, :factory = …, :createOptions = … ]) | static Task<TItem> GetOrCreateAsync<TItem>(IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory)static Task<TItem> GetOrCreateAsync<TItem>(IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory, MemoryCacheEntryOptions createOptions) |
Set | Set([ :cache = …, :key = …, :value = … ])Set([ :cache = …, :key = …, :value = …, :absoluteExpiration = … ])Set([ :cache = …, :key = …, :value = …, :absoluteExpirationRelativeToNow = … ])Set([ :cache = …, :key = …, :value = …, :expirationToken = … ]) | static TItem Set<TItem>(IMemoryCache cache, object key, TItem value)static TItem Set<TItem>(IMemoryCache cache, object key, TItem value, DateTimeOffset absoluteExpiration)static TItem Set<TItem>(IMemoryCache cache, object key, TItem value, TimeSpan absoluteExpirationRelativeToNow)static TItem Set<TItem>(IMemoryCache cache, object key, TItem value, IChangeToken expirationToken)static TItem Set<TItem>(IMemoryCache cache, object key, TItem value, MemoryCacheEntryOptions options) |
TryGetValue | TryGetValue(p1,p2) | static bool TryGetValue<TItem>(IMemoryCache cache, object key, out TItem value) |
ICacheEntry interface
Microsoft.Extensions.Caching.Memory.ICacheEntry · assembly Microsoft.Extensions.Caching.Abstractions
Implements: IDisposable
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Key | object | read | o.Key |
Value | object | read, write | o.Value o.Value = v |
AbsoluteExpiration | DateTimeOffset? | read, write | o.AbsoluteExpiration o.AbsoluteExpiration = v |
AbsoluteExpirationRelativeToNow | TimeSpan? | read, write | o.AbsoluteExpirationRelativeToNow o.AbsoluteExpirationRelativeToNow = v |
SlidingExpiration | TimeSpan? | read, write | o.SlidingExpiration o.SlidingExpiration = v |
ExpirationTokens | IList<IChangeToken> | read | o.ExpirationTokens |
PostEvictionCallbacks | IList<PostEvictionCallbackRegistration> | read | o.PostEvictionCallbacks |
Priority | CacheItemPriority | read, write | o.Priority o.Priority = v |
Size | long? | read, write | o.Size o.Size = v |
IMemoryCache interface
Microsoft.Extensions.Caching.Memory.IMemoryCache · assembly Microsoft.Extensions.Caching.Abstractions
Implements: IDisposable
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
CreateEntry | callMethod("CreateEntry",[p1]) | ICacheEntry CreateEntry(object key) |
GetCurrentStatistics | callMethod("GetCurrentStatistics",[]) | MemoryCacheStatistics GetCurrentStatistics() |
Remove | Remove(p1) | void Remove(object key) |
TryGetValue | TryGetValue(p1) | bool TryGetValue(object key, out object value) |
MemoryCache class
Microsoft.Extensions.Caching.Memory.MemoryCache · assembly Microsoft.Extensions.Caching.Memory
Implements: IDisposable
Constructors
new MemoryCache(IOptions<MemoryCacheOptions> optionsAccessor) |
new MemoryCache(IOptions<MemoryCacheOptions> optionsAccessor, ILoggerFactory loggerFactory) |
Ring: new MemoryCache(args) uses one constructor; the others are chosen by the parameter names: new MemoryCache().@New([ :param = value ]) or dnNew("MemoryCache",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Count | int | read | o.Count |
Keys | IEnumerable<object> | read | o.Keys |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Clear | callMethod("Clear",[]) | void Clear() |
Compact | callMethod("Compact",[p1]) | void Compact(double percentage) |
CreateEntry | callMethod("CreateEntry",[p1]) | ICacheEntry CreateEntry(object key) |
Dispose | callMethod("Dispose",[]) | void Dispose() |
GetCurrentStatistics | callMethod("GetCurrentStatistics",[]) | MemoryCacheStatistics GetCurrentStatistics() |
Remove | Remove(p1) | void Remove(object key) |
TryGetValue | TryGetValue(p1) | bool TryGetValue(object key, out object result) |
MemoryCacheEntryExtensions class static
Microsoft.Extensions.Caching.Memory.MemoryCacheEntryExtensions · assembly Microsoft.Extensions.Caching.Abstractions
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
AddExpirationToken | AddExpirationToken(p1,p2) | static MemoryCacheEntryOptions AddExpirationToken(MemoryCacheEntryOptions options, IChangeToken expirationToken) |
RegisterPostEvictionCallback | RegisterPostEvictionCallback([ :options = …, :callback = … ])RegisterPostEvictionCallback([ :options = …, :callback = …, :state = … ]) | static MemoryCacheEntryOptions RegisterPostEvictionCallback(MemoryCacheEntryOptions options, PostEvictionDelegate callback)static MemoryCacheEntryOptions RegisterPostEvictionCallback(MemoryCacheEntryOptions options, PostEvictionDelegate callback, object state) |
SetAbsoluteExpiration | SetAbsoluteExpiration(p1,p2) | static MemoryCacheEntryOptions SetAbsoluteExpiration(MemoryCacheEntryOptions options, TimeSpan relative)static MemoryCacheEntryOptions SetAbsoluteExpiration(MemoryCacheEntryOptions options, DateTimeOffset absolute) |
SetPriority | SetPriority(p1,p2) | static MemoryCacheEntryOptions SetPriority(MemoryCacheEntryOptions options, CacheItemPriority priority) |
SetSize | SetSize(p1,p2) | static MemoryCacheEntryOptions SetSize(MemoryCacheEntryOptions options, long size) |
SetSlidingExpiration | SetSlidingExpiration(p1,p2) | static MemoryCacheEntryOptions SetSlidingExpiration(MemoryCacheEntryOptions options, TimeSpan offset) |
MemoryCacheEntryOptions class
Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions · assembly Microsoft.Extensions.Caching.Abstractions
Constructors
new MemoryCacheEntryOptions() |
Ring: new MemoryCacheEntryOptions(args) uses one constructor; the others are chosen by the parameter names: new MemoryCacheEntryOptions().@New([ :param = value ]) or dnNew("MemoryCacheEntryOptions",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
AbsoluteExpiration | DateTimeOffset? | read, write | o.AbsoluteExpiration o.AbsoluteExpiration = v |
AbsoluteExpirationRelativeToNow | TimeSpan? | read, write | o.AbsoluteExpirationRelativeToNow o.AbsoluteExpirationRelativeToNow = v |
SlidingExpiration | TimeSpan? | read, write | o.SlidingExpiration o.SlidingExpiration = v |
ExpirationTokens | IList<IChangeToken> | read | o.ExpirationTokens |
PostEvictionCallbacks | IList<PostEvictionCallbackRegistration> | read | o.PostEvictionCallbacks |
Priority | CacheItemPriority | read, write | o.Priority o.Priority = v |
Size | long? | read, write | o.Size o.Size = v |
MemoryCacheOptions class
Microsoft.Extensions.Caching.Memory.MemoryCacheOptions · assembly Microsoft.Extensions.Caching.Memory
Constructors
new MemoryCacheOptions() |
Ring: new MemoryCacheOptions(args) uses one constructor; the others are chosen by the parameter names: new MemoryCacheOptions().@New([ :param = value ]) or dnNew("MemoryCacheOptions",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Clock | ISystemClock | read, write | o.Clock o.Clock = v |
ExpirationScanFrequency | TimeSpan | read, write | o.ExpirationScanFrequency o.ExpirationScanFrequency = v |
SizeLimit | long? | read, write | o.SizeLimit o.SizeLimit = v |
CompactOnMemoryPressure | bool | read, write | o.CompactOnMemoryPressure o.CompactOnMemoryPressure = v |
CompactionPercentage | double | read, write | o.CompactionPercentage o.CompactionPercentage = v |
TrackLinkedCacheEntries | bool | read, write | o.TrackLinkedCacheEntries o.TrackLinkedCacheEntries = v |
TrackStatistics | bool | read, write | o.TrackStatistics o.TrackStatistics = v |
MemoryCacheStatistics class
Microsoft.Extensions.Caching.Memory.MemoryCacheStatistics · assembly Microsoft.Extensions.Caching.Abstractions
Constructors
new MemoryCacheStatistics() |
Ring: new MemoryCacheStatistics(args) uses one constructor; the others are chosen by the parameter names: new MemoryCacheStatistics().@New([ :param = value ]) or dnNew("MemoryCacheStatistics",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
CurrentEntryCount | long | read, write | o.CurrentEntryCount o.CurrentEntryCount = v |
CurrentEstimatedSize | long? | read, write | o.CurrentEstimatedSize o.CurrentEstimatedSize = v |
TotalMisses | long | read, write | o.TotalMisses o.TotalMisses = v |
TotalHits | long | read, write | o.TotalHits o.TotalHits = v |
MemoryDistributedCacheOptions class · extends MemoryCacheOptions
Microsoft.Extensions.Caching.Memory.MemoryDistributedCacheOptions · assembly Microsoft.Extensions.Caching.Memory
Constructors
new MemoryDistributedCacheOptions() |
Ring: new MemoryDistributedCacheOptions(args) uses one constructor; the others are chosen by the parameter names: new MemoryDistributedCacheOptions().@New([ :param = value ]) or dnNew("MemoryDistributedCacheOptions",[ :param = value ]).
Members of the base class are inherited.
PostEvictionCallbackRegistration class
Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration · assembly Microsoft.Extensions.Caching.Abstractions
Constructors
new PostEvictionCallbackRegistration() |
Ring: new PostEvictionCallbackRegistration(args) uses one constructor; the others are chosen by the parameter names: new PostEvictionCallbackRegistration().@New([ :param = value ]) or dnNew("PostEvictionCallbackRegistration",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
EvictionCallback | PostEvictionDelegate | read, write | o.EvictionCallback o.EvictionCallback = v |
State | object | read, write | o.State o.State = v |