Table of Contents

Class NonSlidingTtl

Namespace
Polly.Caching
Assembly
Polly.dll

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

absoluteExpirationTime DateTimeOffset

The 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

DateTimeOffset

Methods

GetTtl(Context)

Gets a TTL for a cacheable item, given the current execution context.

public Ttl GetTtl(Context context)

Parameters

context Context

The execution context.

Returns

Ttl

A Ttl representing the remaining Ttl of the cached item.