PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.ISingleItemCache< T > Interface Template Reference

SingleItemCache provides a light, fast, caching wrapper around a function to generate a value with a provided TTL. More...

Inheritance diagram for PeanutButter.Utils.ISingleItemCache< T >:
PeanutButter.Utils.SingleItemCache< T >

Public Member Functions

void Invalidate ()
 Invalidates the cache such that the next call will definitely regenerate the value.

Properties

Value [get]
 The value for the generator, or a cached value, if available and still fresh enough.
Func< T > Generator [get]
 Expose the generator (might be useful for testing purposes)
TimeSpan TimeToLive [get]
 Expose the provided TimeToLive (might be useful for testing purposes)

Detailed Description

SingleItemCache provides a light, fast, caching wrapper around a function to generate a value with a provided TTL.

Member Function Documentation

◆ Invalidate()

void PeanutButter.Utils.ISingleItemCache< T >.Invalidate ( )

Invalidates the cache such that the next call will definitely regenerate the value.

Exceptions
NotImplementedException

Implemented in PeanutButter.Utils.SingleItemCache< T >.

Property Documentation

◆ Generator

Func<T> PeanutButter.Utils.ISingleItemCache< T >.Generator
get

Expose the generator (might be useful for testing purposes)

Implemented in PeanutButter.Utils.SingleItemCache< T >.

◆ TimeToLive

TimeSpan PeanutButter.Utils.ISingleItemCache< T >.TimeToLive
get

Expose the provided TimeToLive (might be useful for testing purposes)

Implemented in PeanutButter.Utils.SingleItemCache< T >.

◆ Value

T PeanutButter.Utils.ISingleItemCache< T >.Value
get

The value for the generator, or a cached value, if available and still fresh enough.

Implemented in PeanutButter.Utils.SingleItemCache< T >.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.Utils/SingleItemCache.cs