InvalidateAsync(MethodInfo, object, params object[])
Asynchronously 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 for asynchronous methods.
Declaration
Task InvalidateAsync(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 |
| object[] | args | The method arguments. |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous operation. |
InvalidateAsync(ICacheDependency)
Asynchronously invalidates a cache dependency given as an ICacheDependency, i.e. removes all cache items that are dependent on this dependency.
Declaration
Task InvalidateAsync(ICacheDependency dependency)Parameters
| Type | Name | Description |
|---|---|---|
| ICacheDependency | dependency | A dependency. |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous operation. |
InvalidateAsync(string)
Asynchronously invalidates a cache dependency given as string, i.e. removes all cache items that are dependent on this dependency key.
Declaration
Task InvalidateAsync(string dependencyKey)Parameters
| Type | Name | Description |
|---|---|---|
| string | dependencyKey | The dependency key. |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous operation. |
InvalidateAsync(object)
Asynchronously invalidates a cache dependency given an object, i.e. removes all cached items that are dependent on that object.
Declaration
Task InvalidateAsync(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, |
Returns
| Type | Description |
|---|---|
| Task | A Task that represents the asynchronous operation. |