PostSharp5.0/API Reference/Post­Sharp.​Patterns.​Caching Namespace/Caching­Services.​Invalidation Class/Invalidation Methods/Invalidation.​Recache Method/Caching­Services.​Invalidation.​Recache(TReturn) Method (Func(TReturn))

CachingServices.Invalidation.Recache<TReturn> Method (Func<TReturn>)

Evaluates a method, ignoring the currently cached value, and replaces the corresponding cache item with the new return value of the method. This overload is for methods with 0 parameter.

Namespace:  PostSharp.Patterns.Caching
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public static TReturn Recache<TReturn>(
	Func<TReturn> method
)

Parameters

method
Type: System.Func<TReturn>
A delegate of the method to evaluate.

Type Parameters

TReturn
The return type of the method.

Return Value

Type: TReturn
The return value of method.
See Also