View Source
Class AppCacheExtensions
Extensions for strongly typed access
Assembly: Umbraco.Core.dll
Syntax
public static class AppCacheExtensions
Methods
View Source
GetCacheItemAsync<T>(IAppPolicyCache, string, Func<Task<T?>>, TimeSpan?, bool)
Declaration
public static Task<T?> GetCacheItemAsync<T>(this IAppPolicyCache provider, string cacheKey, Func<Task<T?>> getCacheItemAsync, TimeSpan? timeout, bool isSliding = false)
Parameters
| Type |
Name |
Description |
| IAppPolicyCache |
provider |
|
| string |
cacheKey |
|
| Func<Task<T>> |
getCacheItemAsync |
|
| TimeSpan? |
timeout |
|
| bool |
isSliding |
|
Returns
Type Parameters
View Source
GetCacheItem<T>(IAppCache, string)
Declaration
public static T? GetCacheItem<T>(this IAppCache provider, string cacheKey)
Parameters
| Type |
Name |
Description |
| IAppCache |
provider |
|
| string |
cacheKey |
|
Returns
Type Parameters
View Source
GetCacheItem<T>(IAppCache, string, Func<T>)
Declaration
public static T? GetCacheItem<T>(this IAppCache provider, string cacheKey, Func<T> getCacheItem)
Parameters
| Type |
Name |
Description |
| IAppCache |
provider |
|
| string |
cacheKey |
|
| Func<T> |
getCacheItem |
|
Returns
Type Parameters
View Source
GetCacheItem<T>(IAppPolicyCache, string, Func<T?>, TimeSpan?, bool)
Declaration
public static T? GetCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T?> getCacheItem, TimeSpan? timeout, bool isSliding = false)
Parameters
| Type |
Name |
Description |
| IAppPolicyCache |
provider |
|
| string |
cacheKey |
|
| Func<T> |
getCacheItem |
|
| TimeSpan? |
timeout |
|
| bool |
isSliding |
|
Returns
Type Parameters
View Source
GetCacheItemsByKeyExpression<T>(IAppCache, string)
Declaration
public static IEnumerable<T?> GetCacheItemsByKeyExpression<T>(this IAppCache provider, string regexString)
Parameters
| Type |
Name |
Description |
| IAppCache |
provider |
|
| string |
regexString |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
View Source
GetCacheItemsByKeySearch<T>(IAppCache, string)
Declaration
public static IEnumerable<T?> GetCacheItemsByKeySearch<T>(this IAppCache provider, string keyStartsWith)
Parameters
| Type |
Name |
Description |
| IAppCache |
provider |
|
| string |
keyStartsWith |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
View Source
InsertCacheItemAsync<T>(IAppPolicyCache, string, Func<Task<T>>, TimeSpan?, bool)
Declaration
public static Task InsertCacheItemAsync<T>(this IAppPolicyCache provider, string cacheKey, Func<Task<T>> getCacheItemAsync, TimeSpan? timeout = null, bool isSliding = false)
Parameters
| Type |
Name |
Description |
| IAppPolicyCache |
provider |
|
| string |
cacheKey |
|
| Func<Task<T>> |
getCacheItemAsync |
|
| TimeSpan? |
timeout |
|
| bool |
isSliding |
|
Returns
Type Parameters
View Source
InsertCacheItem<T>(IAppPolicyCache, string, Func<T>, TimeSpan?, bool)
Declaration
public static void InsertCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, TimeSpan? timeout = null, bool isSliding = false)
Parameters
| Type |
Name |
Description |
| IAppPolicyCache |
provider |
|
| string |
cacheKey |
|
| Func<T> |
getCacheItem |
|
| TimeSpan? |
timeout |
|
| bool |
isSliding |
|
Type Parameters