Open sandboxFocus
  • TOC

Post­Sharp Documentation

Introduction

Deployment and Configuration

Adding Aspects to Code

Logging

Contracts

INotify­Property­Changed

Weak Event

XAML

Parent/Child, Visitor and Disposable

Undo/Redo

Caching

Multithreading

Developing Custom Aspects

Validating Architecture

Testing and Debugging

Miscellaneous

API Reference

Post­Sharp

Post­Sharp.​Aspects

Post­Sharp.​Aspects.​Advices

Post­Sharp.​Aspects.​Configuration

Post­Sharp.​Aspects.​Dependencies

Post­Sharp.​Aspects.​Internals

Post­Sharp.​Aspects.​Serialization

Post­Sharp.​Collections

Post­Sharp.​Constraints

Post­Sharp.​Extensibility

Post­Sharp.​Extensibility.​Build­Time­Logging

Post­Sharp.​Patterns

Post­Sharp.​Patterns.​Caching

Post­Sharp.​Patterns.​Caching.​Backends

Post­Sharp.​Patterns.​Caching.​Backends.​Azure

Post­Sharp.​Patterns.​Caching.​Backends.​Redis

Post­Sharp.​Patterns.​Caching.​Dependencies

Post­Sharp.​Patterns.​Caching.​Formatters

Post­Sharp.​Patterns.​Caching.​Implementation

Post­Sharp.​Patterns.​Caching.​Locking

Post­Sharp.​Patterns.​Caching.​Serializers

Post­Sharp.​Patterns.​Caching.​Value­Adapters

Post­Sharp.​Patterns.​Collections

Post­Sharp.​Patterns.​Collections.​Advices

Post­Sharp.​Patterns.​Contracts

Post­Sharp.​Patterns.​Diagnostics

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Core

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Framework

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Diagnostic­Source

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Http­Client

Post­Sharp.​Patterns.​Diagnostics.​Audit

Post­Sharp.​Patterns.​Diagnostics.​Backends

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Application­Insights

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Audit

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Common­Logging

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Console

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Event­Source

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Log4Net

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Microsoft

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Multiplexer

Post­Sharp.​Patterns.​Diagnostics.​Backends.​NLog

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Null

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Serilog

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Trace

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Trace­Source

Post­Sharp.​Patterns.​Diagnostics.​Contexts

Post­Sharp.​Patterns.​Diagnostics.​Correlation

Post­Sharp.​Patterns.​Diagnostics.​Custom

Post­Sharp.​Patterns.​Diagnostics.​Custom.​Messages

Post­Sharp.​Patterns.​Diagnostics.​Formatters

Post­Sharp.​Patterns.​Diagnostics.​Record­Builders

Post­Sharp.​Patterns.​Diagnostics.​Threading­Instrumentation

Post­Sharp.​Patterns.​Diagnostics.​Transactions

Post­Sharp.​Patterns.​Diagnostics.​Transactions.​Model

Post­Sharp.​Patterns.​Dynamic­Advising

Post­Sharp.​Patterns.​Formatters

Post­Sharp.​Patterns.​Model

Post­Sharp.​Patterns.​Model.​Controls

Post­Sharp.​Patterns.​Model.​Type­Adapters

Post­Sharp.​Patterns.​Recording

Post­Sharp.​Patterns.​Recording.​Operations

Post­Sharp.​Patterns.​Threading

Post­Sharp.​Patterns.​Threading.​Models

Post­Sharp.​Patterns.​Utilities

Post­Sharp.​Patterns.​Xaml

Post­Sharp.​Reflection

Post­Sharp.​Reflection.​Method­Body

Post­Sharp.​Serialization

  • Article

Class CachingServices.Invalidation

Invalidates the cache.

Inheritance
CachingServices.Invalidation
Namespace: PostSharp.Patterns.Caching
Assembly: PostSharp.Patterns.Caching.dll
Syntax
public static class CachingServices.Invalidation

Methods

Name Description
Invalidate(ICacheDependency)

Invalidates a cache dependency given as an ICacheDependency, i.e. removes all cache items that are dependent on this dependency.

Invalidate(object)

Invalidates a cache dependency given an object, i.e. removes all cached items that are dependent on that object.

Invalidate(MethodInfo, object, params object[])

Removes a method call result from the cache giving the MethodInfo representing the method, the instance and the arguments of the method call.

Invalidate(string)

Invalidates a cache dependency given as string, i.e. removes all cache items that are dependent on this dependency key.

InvalidateAsync(ICacheDependency)

Asynchronously invalidates a cache dependency given as an ICacheDependency, i.e. removes all cache items that are dependent on this dependency.

InvalidateAsync(object)

Asynchronously invalidates a cache dependency given an object, i.e. removes all cached items that are dependent on that object.

InvalidateAsync(MethodInfo, object, params object[])

Asynchronously removes a method call result from the cache giving the MethodInfo representing the method, the instance and the arguments of the method call.

InvalidateAsync(string)

Asynchronously invalidates a cache dependency given as string, i.e. removes all cache items that are dependent on this dependency key.

InvalidateAsync<TReturn>(Func<TReturn>)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 0 parameter.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 9 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 10 parameters.

InvalidateAsync<TReturn, TParam1>(Func<TParam1, TReturn>, TParam1)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 1 parameter.

InvalidateAsync<TReturn, TParam1, TParam2>(Func<TParam1, TParam2, TReturn>, TParam1, TParam2)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 2 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3>(Func<TParam1, TParam2, TParam3, TReturn>, TParam1, TParam2, TParam3)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 3 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4>(Func<TParam1, TParam2, TParam3, TParam4, TReturn>, TParam1, TParam2, TParam3, TParam4)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 4 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 5 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 6 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 7 parameters.

InvalidateAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8)

Asynchronously removes a method call result from the cache giving the delegate of the method. This overload is for methods with 8 parameters.

Invalidate<TReturn>(Func<TReturn>)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 0 parameter.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 9 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 10 parameters.

Invalidate<TReturn, TParam1>(Func<TParam1, TReturn>, TParam1)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 1 parameter.

Invalidate<TReturn, TParam1, TParam2>(Func<TParam1, TParam2, TReturn>, TParam1, TParam2)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 2 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3>(Func<TParam1, TParam2, TParam3, TReturn>, TParam1, TParam2, TParam3)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 3 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4>(Func<TParam1, TParam2, TParam3, TParam4, TReturn>, TParam1, TParam2, TParam3, TParam4)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 4 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 5 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 6 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 7 parameters.

Invalidate<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8)

Removes a method call result from the cache giving the delegate of the method. This overload is for methods with 8 parameters.

RecacheAsync<TReturn>(Func<Task<TReturn>>)

Asynchronously 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.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9)

Asynchronously 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 9 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10)

Asynchronously 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 10 parameters.

RecacheAsync<TReturn, TParam1>(Func<TParam1, Task<TReturn>>, TParam1)

Asynchronously 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 1 parameter.

RecacheAsync<TReturn, TParam1, TParam2>(Func<TParam1, TParam2, Task<TReturn>>, TParam1, TParam2)

Asynchronously 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 2 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3>(Func<TParam1, TParam2, TParam3, Task<TReturn>>, TParam1, TParam2, TParam3)

Asynchronously 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 3 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4>(Func<TParam1, TParam2, TParam3, TParam4, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4)

Asynchronously 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 4 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5)

Asynchronously 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 5 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6)

Asynchronously 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 6 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7)

Asynchronously 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 7 parameters.

RecacheAsync<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, Task<TReturn>>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8)

Asynchronously 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 8 parameters.

Recache<TReturn>(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.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9)

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 9 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TParam9, TParam10)

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 10 parameters.

Recache<TReturn, TParam1>(Func<TParam1, TReturn>, TParam1)

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 1 parameter.

Recache<TReturn, TParam1, TParam2>(Func<TParam1, TParam2, TReturn>, TParam1, TParam2)

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 2 parameters.

Recache<TReturn, TParam1, TParam2, TParam3>(Func<TParam1, TParam2, TParam3, TReturn>, TParam1, TParam2, TParam3)

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 3 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4>(Func<TParam1, TParam2, TParam3, TParam4, TReturn>, TParam1, TParam2, TParam3, TParam4)

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 4 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5)

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 5 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6)

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 6 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7)

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 7 parameters.

Recache<TReturn, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8>(Func<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8, TReturn>, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6, TParam7, TParam8)

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 8 parameters.

  • Navigation