Table of Contents

Struct Ttl

Namespace
Polly.Caching
Assembly
Polly.dll

Represents a time-to-live for a given cache item.

public struct Ttl
Inherited Members

Constructors

Ttl(TimeSpan)

Creates a new Ttl struct.

public Ttl(TimeSpan timeSpan)

Parameters

timeSpan TimeSpan

The timespan for which this cache-item remains valid.
Will be considered as not denoting sliding expiration.

Ttl(TimeSpan, bool)

Creates a new Ttl struct.

public Ttl(TimeSpan timeSpan, bool slidingExpiration)

Parameters

timeSpan TimeSpan

The timespan for which this cache-item remains valid

slidingExpiration bool

Whether this Ttl should be considered as sliding expiration.

Fields

SlidingExpiration

Whether this Ttl should be considered as sliding expiration: that is, the cache item should be considered valid for a further period of duration Timespan each time the cache item is retrieved.

public bool SlidingExpiration

Field Value

bool

Timespan

The timespan for which this cache-item remains valid.

public TimeSpan Timespan

Field Value

TimeSpan