Class NonSlidingTtl
Represents an ITtlStrategy expiring at an absolute time, not with sliding expiration.
public abstract class NonSlidingTtl : ITtlStrategy
- Inheritance
-
NonSlidingTtl
- Implements
- Derived
- Inherited Members
Constructors
NonSlidingTtl(DateTimeOffset)
Constructs a new instance of the NonSlidingTtl strategy.
protected NonSlidingTtl(DateTimeOffset absoluteExpirationTime)
Parameters
absoluteExpirationTimeDateTimeOffsetThe absolute expiration time for cache items, represented by this strategy.
Fields
absoluteExpirationTime
The absolute expiration time for cache items, represented by this strategy.
protected readonly DateTimeOffset absoluteExpirationTime
Field Value
Methods
GetTtl(Context)
Gets a TTL for a cacheable item, given the current execution context.
public Ttl GetTtl(Context context)
Parameters
contextContextThe execution context.