Class CacheReadAttribute
- Namespace
- Apizr.Caching.Attributes
- Assembly
- Apizr.dll
Tells Apizr to cache Read method You have to provide an ICacheHandler mapping implementation to Apizr to use this feature
[AttributeUsage(AttributeTargets.Class)]
public class CacheReadAttribute : CacheAttributeBase, _Attribute
- Inheritance
-
CacheReadAttribute
- Implements
- Inherited Members
Constructors
CacheReadAttribute()
Cache with no specific lifetime, default FetchOrGet mode and no invalidation on error
public CacheReadAttribute()
CacheReadAttribute(CacheMode)
Cache with no specific lifetime, no invalidation on error but a specific cache mode
public CacheReadAttribute(CacheMode mode)
Parameters
mode
CacheModeFetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one
CacheReadAttribute(CacheMode, bool)
Cache with a specific cache and invalidation on error, but no specific lifetime
public CacheReadAttribute(CacheMode mode, bool shouldInvalidateOnError)
Parameters
mode
CacheModeFetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one
shouldInvalidateOnError
boolShould invalidate on error
CacheReadAttribute(CacheMode, string)
Cache with a specific cache and mode specific lifetime, but no invalidation on error
public CacheReadAttribute(CacheMode mode, string lifeSpanRepresentation)
Parameters
mode
CacheModeFetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one
lifeSpanRepresentation
stringTimeSpan representation to parse
CacheReadAttribute(CacheMode, string, bool)
Cache with a specific cache mode, a specific lifetime and invalidation on error
public CacheReadAttribute(CacheMode mode, string lifeSpanRepresentation, bool shouldInvalidateOnError)
Parameters
mode
CacheModeFetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one
lifeSpanRepresentation
stringThis specific caching lifetime
shouldInvalidateOnError
boolShould invalidate on error
CacheReadAttribute(bool)
Cache with no specific lifetime, default FetchOrGet mode but with or without invalidation on error
public CacheReadAttribute(bool shouldInvalidateOnError)
Parameters
shouldInvalidateOnError
boolShould invalidate on error
CacheReadAttribute(string)
Cache with default FetchOrGet mode, no invalidation on error but with a specific lifetime
public CacheReadAttribute(string lifeSpanRepresentation)
Parameters
lifeSpanRepresentation
stringTimeSpan representation to parse
CacheReadAttribute(TimeSpan, bool)
Cache with a specific lifetime and invalidation on error, but default FetchOrGet mode
public CacheReadAttribute(TimeSpan lifeSpan, bool shouldInvalidateOnError)