Interface IImageCache
- Namespace
- SixLabors.ImageSharp.Web.Caching
- Assembly
- SixLabors.ImageSharp.Web.dll
Specifies the contract for caching images.
public interface IImageCache
Methods
GetAsync(string)
Gets the image resolver associated with the specified key.
Task<IImageCacheResolver?> GetAsync(string key)
Parameters
keystringThe cache key.
Returns
SetAsync(string, Stream, ImageCacheMetadata)
Sets the value associated with the specified key.
Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)
Parameters
keystringThe cache key.
streamStreamThe stream containing the image to store.
metadataImageCacheMetadataThe ImageCacheMetadata associated with the image to store.
Returns
- Task
The task.