Table of Contents

Class SlidingTtl

Namespace
Polly.Caching
Assembly
Polly.dll

Defines a ttl strategy which will cache items with a sliding ttl.

public class SlidingTtl : ITtlStrategy
Inheritance
SlidingTtl
Implements
Inherited Members

Constructors

SlidingTtl(TimeSpan)

Constructs a new instance of the SlidingTtl ttl strategy.

public SlidingTtl(TimeSpan slidingTtl)

Parameters

slidingTtl TimeSpan

The sliding timespan for which cache items should be considered valid.

Methods

GetTtl(Context)

Gets a TTL for the cacheable item.

public Ttl GetTtl(Context context)

Parameters

context Context

The execution context.

Returns

Ttl

A Ttl representing the remaining Ttl of the cached item.