Caching/ForgeTrust.Runnable.Caching/CachePolicy.cs

CachePolicy

Type

CachePolicy

Describes the expiration behavior for a cached entry. Use the static factory methods to create common configurations.
Method

Absolute(TimeSpan)

Creates a policy that evicts the entry after a fixed duration from creation.
Method

Sliding(TimeSpan)

Creates a policy that evicts the entry if it is not accessed within the given window. Each access resets the sliding timer.
Method

SlidingWithAbsolute(TimeSpan, TimeSpan)

Creates a policy that slides the entry on each access but enforces an absolute ceiling. The entry is evicted when it has been idle for , or unconditionally after from creation, whichever comes first.