File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/ImageSharp.Web.Providers.Azure/Caching Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public AzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions> cacheOptions
3636 /// <inheritdoc/>
3737 public async Task < IImageCacheResolver ? > GetAsync ( string key )
3838 {
39- BlobClient blob = this . container . GetBlobClient ( this . GetBlobName ( key ) ) ;
39+ BlobClient blob = this . GetBlob ( key ) ;
4040
4141 if ( ! await blob . ExistsAsync ( ) )
4242 {
@@ -49,7 +49,7 @@ public AzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions> cacheOptions
4949 /// <inheritdoc/>
5050 public Task SetAsync ( string key , Stream stream , ImageCacheMetadata metadata )
5151 {
52- BlobClient blob = this . container . GetBlobClient ( this . GetBlobName ( key ) ) ;
52+ BlobClient blob = this . GetBlob ( key ) ;
5353
5454 BlobHttpHeaders headers = new ( )
5555 {
@@ -84,6 +84,6 @@ public static Response<BlobContainerInfo> CreateIfNotExists(
8484 PublicAccessType accessType )
8585 => new BlobContainerClient ( options . ConnectionString , options . ContainerName ) . CreateIfNotExists ( accessType ) ;
8686
87- private string GetBlobName ( string key )
88- => this . cacheFolder + key ;
87+ private BlobClient GetBlob ( string key )
88+ => this . container . GetBlobClient ( this . cacheFolder + key ) ;
8989}
You can’t perform that action at this time.
0 commit comments