Interface ICacheRefresher<T>
Defines a strongly typed cache refresher that can refresh cache using object instances.
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public interface ICacheRefresher<T> : ICacheRefresher, IDiscoverable
Type Parameters
| Name | Description |
|---|---|
| T | The type of entity being cached. |
Remarks
This interface provides better performance in non-load-balanced environments by allowing cache refresh operations on already-resolved object instances, avoiding the need to re-lookup objects by their identifiers.
Methods
View SourceRefresh(T)
Refreshes the cache for the specified instance.
Declaration
void Refresh(T instance)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to refresh in the cache. |
Remove(T)
Removes the specified instance from the cache.
Declaration
void Remove(T instance)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to remove from the cache. |