Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​Extensions.​Caching.​Distributed.​DistributedCacheEntryExtensions

Assembly: Microsoft.Extensions.Caching.Abstractions

Inheritance: object → DistributedCacheEntryExtensions

Provides extension methods for <see cref="T:Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions" /> operations.

Methods

SetAbsoluteExpiration​(DistributedCacheEntryOptions options, System.​DateTimeOffset absolute)
Sets an absolute expiration date for the cache entry.
options The options to be operated on.
absolute The expiration time, in absolute terms.
SetAbsoluteExpiration​(DistributedCacheEntryOptions options, System.​TimeSpan relative)
Sets an absolute expiration time, relative to now.
options The options to be operated on.
relative The expiration time, relative to now.
SetSlidingExpiration​(DistributedCacheEntryOptions options, System.​TimeSpan offset)
Sets how long the cache entry can be inactive (for example, not accessed) before it will be removed. This will not extend the entry lifetime beyond the absolute expiration (if set).
options The options to be operated on.
offset The sliding expiration time.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object