Interface IDeliveryApiOutputCacheManager
Provides programmatic eviction of Delivery API output cache entries.
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public interface IDeliveryApiOutputCacheManager
Remarks
Use this to evict cached responses from custom code, for example when external data changes that affects a Delivery API response. All methods are no-ops when output caching is not enabled.
Methods
View SourceEvictAllAsync(CancellationToken)
Evicts all cached Delivery API responses (content and media).
Declaration
Task EvictAllAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
EvictAllContentAsync(CancellationToken)
Evicts all cached Delivery API content responses.
Declaration
Task EvictAllContentAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
EvictAllMediaAsync(CancellationToken)
Evicts all cached Delivery API media responses.
Declaration
Task EvictAllMediaAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
EvictByTagAsync(string, CancellationToken)
Evicts all cached Delivery API responses 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 Delivery API response 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 |
EvictMediaAsync(Guid, CancellationToken)
Evicts the cached Delivery API response for a specific media item.
Declaration
Task EvictMediaAsync(Guid mediaKey, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | mediaKey | The key of the media item to evict. |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |