2 implementations of IMemoryCache
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (1)
125 references to IMemoryCache
aspire (4)
Aspire.Cli.Tests (42)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.TagHelpers (18)
Microsoft.AspNetCore.ResponseCaching (2)
Microsoft.Extensions.Caching.Abstractions (28)
MemoryCacheExtensions.cs (26)
11/// Provides extensions methods for <see cref="IMemoryCache"/> operations.
18/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
21public static object? Get(this IMemoryCache cache, object key)
31/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
34public static TItem? Get<TItem>(this IMemoryCache cache, object key)
44/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
48public static bool TryGetValue<TItem>(this IMemoryCache cache, object key, out TItem? value)
70/// Associate a value with a key in the <see cref="IMemoryCache"/>.
73/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
77public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value)
90/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
95public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value, DateTimeOffset absoluteExpiration)
108/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
113public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value, TimeSpan absoluteExpirationRelativeToNow)
126/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
131public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value, IChangeToken expirationToken)
144/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
149public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value, MemoryCacheEntryOptions? options)
166/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
170public static TItem? GetOrCreate<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory)
179/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
184public static TItem? GetOrCreate<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory, MemoryCacheEntryOptions? createOptions)
206/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
210public static Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory)
219/// <param name="cache">The <see cref="IMemoryCache"/> instance this method extends.</param>
224public static async Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory, MemoryCacheEntryOptions? createOptions)
Microsoft.Extensions.Caching.Hybrid (3)
Microsoft.Extensions.Caching.Hybrid.Tests (10)
Microsoft.Extensions.Caching.Memory (13)