Class QueryCacheStatus
Use case for querying the cache status of multiple assets.
Provides information about which assets are cached, loading, or available.
Inherited Members
Namespace: Serenity.AssetPrefetcher.Application.UseCases
Assembly: Serenity.AssetPrefetcher.Application.dll
Syntax
public class QueryCacheStatus : IAsyncUseCase<QueryCacheStatusInput>, IUseCase
Constructors
QueryCacheStatus(IAssetPrefetcherService)
Initializes the use case with the required asset prefetcher service.
Declaration
public QueryCacheStatus(IAssetPrefetcherService prefetcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetPrefetcherService | prefetcher | The asset prefetcher service to use for operations |
Methods
ExecuteAsync(QueryCacheStatusInput, CancellationToken)
Executes the cache status query for the specified assets.
Declaration
public Task<IReadOnlyDictionary<AssetKey, CacheStatusOutput>> ExecuteAsync(QueryCacheStatusInput input, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryCacheStatusInput | input | Input containing asset keys to query |
| CancellationToken | cancellationToken | Cancellation token for the async operation |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyDictionary<AssetKey, CacheStatusOutput>> | Dictionary mapping asset keys to their cache status information |