Class CacheExtensions
Provides read/write-through extensions
Inheritance
System.Object
    CacheExtensions
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: NFX.ApplicationModel.Pile
Assembly: NFX.dll
Syntax
public static class CacheExtensions
  Methods
DeleteThrough<TKey>(ICache, TKey, String, ICacheParams, Func<TKey, Boolean>)
Declaration
public static bool DeleteThrough<TKey>(this ICache cache, TKey key, string tblCache, ICacheParams caching, Func<TKey, bool> fDelete)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ICache | cache | |
| TKey | key | |
| System.String | tblCache | |
| ICacheParams | caching | |
| System.Func<TKey, System.Boolean> | fDelete | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Type Parameters
| Name | Description | 
|---|---|
| TKey | 
FetchFrom<TKey, TResult>(ICache, TKey, String, ICacheParams, out Boolean)
Fetches an existing item from cache or null. IsAbsent is true when data was read from cache as an AbsentValue
Declaration
public static TResult FetchFrom<TKey, TResult>(this ICache cache, TKey key, string tblCache, ICacheParams caching, out bool isAbsent)where TResult : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| ICache | cache | |
| TKey | key | |
| System.String | tblCache | |
| ICacheParams | caching | |
| System.Boolean | isAbsent | 
Returns
| Type | Description | 
|---|---|
| TResult | 
Type Parameters
| Name | Description | 
|---|---|
| TKey | |
| TResult | 
FetchThrough<TKey, TResult>(ICache, TKey, String, ICacheParams, Func<TKey, TResult>, Func<TKey, TResult, TResult>)
Fetches an item through cache
Declaration
public static TResult FetchThrough<TKey, TResult>(this ICache cache, TKey key, string tblCache, ICacheParams caching, Func<TKey, TResult> fFetch, Func<TKey, TResult, TResult> fFilter = null)where TResult : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| ICache | cache | |
| TKey | key | |
| System.String | tblCache | |
| ICacheParams | caching | |
| System.Func<TKey, TResult> | fFetch | |
| System.Func<TKey, TResult, TResult> | fFilter | 
Returns
| Type | Description | 
|---|---|
| TResult | 
Type Parameters
| Name | Description | 
|---|---|
| TKey | |
| TResult | 
SaveThrough<TKey, TData>(ICache, TKey, TData, String, ICacheParams, Func<TKey, TData, Int32>)
Declaration
public static int SaveThrough<TKey, TData>(this ICache cache, TKey key, TData data, string tblCache, ICacheParams caching, Func<TKey, TData, int> fSave)where TData : class
  Parameters
| Type | Name | Description | 
|---|---|---|
| ICache | cache | |
| TKey | key | |
| TData | data | |
| System.String | tblCache | |
| ICacheParams | caching | |
| System.Func<TKey, TData, System.Int32> | fSave | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Type Parameters
| Name | Description | 
|---|---|
| TKey | |
| TData |