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)
  
  
  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 |  | 
      
        | System.String | cacheKey |  | 
      
        | Func<T> | getCacheItem |  | 
      
        | System.Nullable<TimeSpan> | timeout |  | 
      
        | System.Boolean | isSliding |  | 
    
  
  Returns
  
  Type Parameters
  
  
    View Source
  
  GetCacheItemAsync<T>(IAppPolicyCache, String, Func<Task<T>>, Nullable<TimeSpan>, Boolean)
  
  
  Declaration
  
    public static async Task<T> GetCacheItemAsync<T>(this IAppPolicyCache provider, string cacheKey, Func<Task<T>> getCacheItemAsync, TimeSpan? timeout, bool isSliding = false)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | IAppPolicyCache | provider |  | 
      
        | System.String | cacheKey |  | 
      
        | Func<Task<T>> | getCacheItemAsync |  | 
      
        | System.Nullable<TimeSpan> | timeout |  | 
      
        | System.Boolean | 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 |  | 
      
        | 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)
  
  
  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 |  | 
      
        | System.String | cacheKey |  | 
      
        | Func<T> | getCacheItem |  | 
      
        | System.Nullable<TimeSpan> | timeout |  | 
      
        | System.Boolean | isSliding |  | 
    
  
  Type Parameters
  
  
    View Source
  
  InsertCacheItemAsync<T>(IAppPolicyCache, String, Func<Task<T>>, Nullable<TimeSpan>, Boolean)
  
  
  Declaration
  
    public static async Task InsertCacheItemAsync<T>(this IAppPolicyCache provider, string cacheKey, Func<Task<T>> getCacheItemAsync, TimeSpan? timeout = null, bool isSliding = false)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | IAppPolicyCache | provider |  | 
      
        | System.String | cacheKey |  | 
      
        | Func<Task<T>> | getCacheItemAsync |  | 
      
        | System.Nullable<TimeSpan> | timeout |  | 
      
        | System.Boolean | isSliding |  | 
    
  
  Returns
  
  Type Parameters