Interface IImageCache
Specifies the contract for caching images.
Namespace: SixLabors.ImageSharp.Web.Caching
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public interface IImageCache
Methods
| Edit this page View SourceGetAsync(string)
Gets the image resolver associated with the specified key.
Declaration
Task<IImageCacheResolver?> GetAsync(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The cache key. |
Returns
| Type | Description |
|---|---|
| Task<IImageCacheResolver> | The IImageResolver. |
SetAsync(string, Stream, ImageCacheMetadata)
Sets the value associated with the specified key.
Declaration
Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The cache key. |
| Stream | stream | The stream containing the image to store. |
| ImageCacheMetadata | metadata | The ImageCacheMetadata associated with the image to store. |
Returns
| Type | Description |
|---|---|
| Task | The task. |