View Source
Class AppCacheExtensions
Extensions for strongly typed access
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class AppCacheExtensions
Methods
View Source
GetCacheItem<T>(IAppCache, String)
Declaration
public static T GetCacheItem<T>(this IAppCache provider, string cacheKey)
Parameters
Type |
Name |
Description |
IAppCache |
provider |
|
System.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 |
|
System.String |
cacheKey |
|
Func<T> |
getCacheItem |
|
Returns
Type Parameters
View Source
GetCacheItem<T>(IAppPolicyCache, String, Func<T>, Nullable<TimeSpan>, Boolean, String[])
Declaration
public static T GetCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, TimeSpan? timeout, bool isSliding = false, string[] dependentFiles = null)
Parameters
Type |
Name |
Description |
IAppPolicyCache |
provider |
|
System.String |
cacheKey |
|
Func<T> |
getCacheItem |
|
System.Nullable<TimeSpan> |
timeout |
|
System.Boolean |
isSliding |
|
System.String[] |
dependentFiles |
|
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 |
|
System.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 |
|
System.String |
keyStartsWith |
|
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
View Source
InsertCacheItem<T>(IAppPolicyCache, String, Func<T>, Nullable<TimeSpan>, Boolean, String[])
Declaration
public static void InsertCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, string[] dependentFiles = null)
Parameters
Type |
Name |
Description |
IAppPolicyCache |
provider |
|
System.String |
cacheKey |
|
Func<T> |
getCacheItem |
|
System.Nullable<TimeSpan> |
timeout |
|
System.Boolean |
isSliding |
|
System.String[] |
dependentFiles |
|
Type Parameters