Struct CacheParams
Implements ICacheParams - supplied caching parameters
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
public struct CacheParams : ICacheParams
Properties
CacheAbsentData
When true would cache the instance of AbsentData to signify the absence of data in the backend for key
Declaration
public bool CacheAbsentData { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
DefaultCache
CacheParams that use cache's default
Declaration
public static CacheParams DefaultCache { get; }
Property Value
NoCache
CacheParams that dont use cache
Declaration
public static CacheParams NoCache { get; }
Property Value
OneMinute
CacheParams that uses one minute for sensitive data (i.e. user account-related data)
Declaration
public static CacheParams OneMinute { get; }
Property Value
ReadCacheMaxAgeSec
If greater than 0 then would allow reading a cached result for up-to the specified number of seconds.
If =0 uses cache's default span.
Less than 0 does not try to read from cache
Declaration
public int ReadCacheMaxAgeSec { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
WriteCacheMaxAgeSec
If greater than 0 then writes to cache with the expiration.
If =0 uses cache's default life span.
Less than 0 does not write to cache
Declaration
public int WriteCacheMaxAgeSec { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
WriteCachePriority
Relative cache priority which is used when WriteCacheMaxAgeSec>=0
Declaration
public int WriteCachePriority { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
ReadFreshWriteSec(Int32, Int32)
Cache params with no read but write caching interval and priority
Declaration
public static CacheParams ReadFreshWriteSec(int sec, int priority = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
sec |
|
System.Int32 |
priority |
|
Returns
ReadWriteSec(Int32, Int32)
Cache params with the same read/write interval
Declaration
public static CacheParams ReadWriteSec(int sec, int priority = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
sec |
|
System.Int32 |
priority |
|
Returns
Implements
Extension Methods