Table of Contents

Class CacheReadAllAttribute

Namespace
Apizr.Caching.Attributes
Assembly
Apizr.dll

Tells Apizr to cache ReadAll method You have to provide an ICacheHandler mapping implementation to Apizr to use this feature

[AttributeUsage(AttributeTargets.Class)]
public class CacheReadAllAttribute : CacheAttributeBase, _Attribute
Inheritance
CacheReadAllAttribute
Implements
Inherited Members

Constructors

CacheReadAllAttribute()

Cache with no specific lifetime, default FetchOrGet mode and no invalidation on error

public CacheReadAllAttribute()

CacheReadAllAttribute(CacheMode)

Cache with no specific lifetime, no invalidation on error but a specific cache mode

public CacheReadAllAttribute(CacheMode mode)

Parameters

mode CacheMode

FetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one

CacheReadAllAttribute(CacheMode, bool)

Cache with a specific cache and invalidation on error, but no specific lifetime

public CacheReadAllAttribute(CacheMode mode, bool shouldInvalidateOnError)

Parameters

mode CacheMode

FetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one

shouldInvalidateOnError bool

Should invalidate on error

CacheReadAllAttribute(CacheMode, string)

Cache with a specific cache and mode specific lifetime, but no invalidation on error

public CacheReadAllAttribute(CacheMode mode, string lifeSpanRepresentation)

Parameters

mode CacheMode

FetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one

lifeSpanRepresentation string

TimeSpan representation to parse

CacheReadAllAttribute(CacheMode, string, bool)

Cache with a specific cache mode, a specific lifetime and invalidation on error

public CacheReadAllAttribute(CacheMode mode, string lifeSpanRepresentation, bool shouldInvalidateOnError)

Parameters

mode CacheMode

FetchOrGet returns fresh data when request succeed otherwise cached one, where GetOrFetch returns cached data if we get some otherwise fresh one

lifeSpanRepresentation string

This specific caching lifetime

shouldInvalidateOnError bool

Should invalidate on error

CacheReadAllAttribute(bool)

Cache with no specific lifetime, default FetchOrGet mode but with or without invalidation on error

public CacheReadAllAttribute(bool shouldInvalidateOnError)

Parameters

shouldInvalidateOnError bool

Should invalidate on error

CacheReadAllAttribute(string)

Cache with default FetchOrGet mode, no invalidation on error but with a specific lifetime

public CacheReadAllAttribute(string lifeSpanRepresentation)

Parameters

lifeSpanRepresentation string

TimeSpan representation to parse

CacheReadAllAttribute(TimeSpan, bool)

Cache with a specific lifetime and invalidation on error, but default FetchOrGet mode

public CacheReadAllAttribute(TimeSpan lifeSpan, bool shouldInvalidateOnError)

Parameters

lifeSpan TimeSpan

This specific caching lifetime

shouldInvalidateOnError bool

Should invalidate on error