Interface IWebsiteOutputCacheManager
Provides programmatic eviction of website output cache entries.
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public interface IWebsiteOutputCacheManager
Remarks
Use this to evict cached pages from custom code, for example when external data changes that affects a rendered page. All methods are no-ops when output caching is not enabled.
Methods
View SourceEvictAllAsync(CancellationToken)
Evicts all cached website pages.
Declaration
Task EvictAllAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
EvictByTagAsync(string, CancellationToken)
Evicts all cached pages matching a custom tag.
Declaration
Task EvictByTagAsync(string tag, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tag | The cache tag to evict. |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
EvictContentAsync(Guid, CancellationToken)
Evicts the cached page for a specific content item.
Declaration
Task EvictContentAsync(Guid contentKey, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | contentKey | The key of the content item to evict. |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |