Class AzureBlobStorageCache
Implements an Azure Blob Storage based cache.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Caching.Azure
Assembly: SixLabors.ImageSharp.Web.Providers.Azure.dll
Syntax
public class AzureBlobStorageCache : IImageCache
Constructors
| Improve this Doc View SourceAzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions>)
Initializes a new instance of the AzureBlobStorageCache class.
Declaration
public AzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions> cacheOptions)
Parameters
Type | Name | Description |
---|---|---|
IOptions<AzureBlobStorageCacheOptions> | cacheOptions | The cache options. |
Methods
| Improve this Doc View SourceCreateIfNotExists(AzureBlobStorageCacheOptions, PublicAccessType)
Creates a new container under the specified account if a container with the same name does not already exist.
Declaration
public static Response<BlobContainerInfo> CreateIfNotExists(AzureBlobStorageCacheOptions options, PublicAccessType accessType)
Parameters
Type | Name | Description |
---|---|---|
AzureBlobStorageCacheOptions | options | The Azure Blob Storage cache options. |
PublicAccessType | accessType | Optionally specifies whether data in the container may be accessed publicly and
the level of access. |
Returns
Type | Description |
---|---|
Response<BlobContainerInfo> | If the container does not already exist, a |
GetAsync(String)
Declaration
public async Task<IImageCacheResolver> GetAsync(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
Task<IImageCacheResolver> |
SetAsync(String, Stream, ImageCacheMetadata)
Declaration
public Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
Stream | stream | |
ImageCacheMetadata | metadata |
Returns
Type | Description |
---|---|
Task |