Open sandboxFocus

Method Invalidate

Invalidate(MethodInfo, object, params object[])

Removes a method call result from the cache, using the MethodInfo that represents the method, the instance and the arguments of the method call. The InvalidateCacheAttribute aspect calls this method.

Declaration
public void Invalidate(MethodInfo method, object instance, params object[] args)
Parameters
Type Name Description
MethodInfo method

The MethodInfo of the method call.

object instance

The value of the this instance, or null for static methods.

object[] args

The method arguments.

Implements

Invalidate(object)

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

Declaration
public void Invalidate(object dependency)
Parameters
Type Name Description
object dependency

Typically, an object. If a string, Delegate or ICacheDependency is passed, the proper overload of the method is invoked. Otherwise, dependency is wrapped in an ObjectDependency object.

Implements

Invalidate(ICacheDependency)

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

Declaration
public void Invalidate(ICacheDependency dependency)
Parameters
Type Name Description
ICacheDependency dependency

A dependency.

Implements

Invalidate(string)

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

Declaration
public void Invalidate(string dependencyKey)
Parameters
Type Name Description
string dependencyKey

The dependency key.

Implements