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 |
|
System.Func<T> |
getCacheItem |
|
Returns
Type Parameters
View Source
GetCacheItem<T>(IAppPolicyCache, String, Func<T>, Nullable<TimeSpan>, Boolean, CacheItemPriority, CacheItemRemovedCallback, String[])
Declaration
public static T GetCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
Parameters
Type |
Name |
Description |
IAppPolicyCache |
provider |
|
System.String |
cacheKey |
|
System.Func<T> |
getCacheItem |
|
System.Nullable<System.TimeSpan> |
timeout |
|
System.Boolean |
isSliding |
|
System.Web.Caching.CacheItemPriority |
priority |
|
System.Web.Caching.CacheItemRemovedCallback |
removedCallback |
|
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 |
System.Collections.Generic.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 |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
View Source
InsertCacheItem<T>(IAppPolicyCache, String, Func<T>, Nullable<TimeSpan>, Boolean, CacheItemPriority, CacheItemRemovedCallback, String[])
Declaration
public static void InsertCacheItem<T>(this IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
Parameters
Type |
Name |
Description |
IAppPolicyCache |
provider |
|
System.String |
cacheKey |
|
System.Func<T> |
getCacheItem |
|
System.Nullable<System.TimeSpan> |
timeout |
|
System.Boolean |
isSliding |
|
System.Web.Caching.CacheItemPriority |
priority |
|
System.Web.Caching.CacheItemRemovedCallback |
removedCallback |
|
System.String[] |
dependentFiles |
|
Type Parameters