Table of Contents

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

key string

The cache key.

Returns

Task<IImageCacheResolver>

The IImageResolver.

SetAsync(string, Stream, ImageCacheMetadata)

Sets the value associated with the specified key.

Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)

Parameters

key string

The cache key.

stream Stream

The stream containing the image to store.

metadata ImageCacheMetadata

The ImageCacheMetadata associated with the image to store.

Returns

Task

The task.