@@ -73,7 +73,7 @@ protected FileInfo GetFileInfo(FileType type, string key)
7373 return new FileInfo ( file ) ;
7474 }
7575
76- public virtual async Task < ICachedData ? > ReadAsync ( string key )
76+ public virtual async Task < CachedData ? > ReadAsync ( string key )
7777 {
7878 Metadata ? metadata = await ReadMetadataAsync ( key ) ;
7979
@@ -92,7 +92,7 @@ protected FileInfo GetFileInfo(FileType type, string key)
9292 return new CachedData ( metadata , ( ) => Task . FromResult < Stream > ( blobFile . OpenRead ( ) ) ) ;
9393 }
9494
95- public virtual async Task WriteAsync ( IMetadata metadata , Stream stream )
95+ public virtual async Task WriteAsync ( Metadata metadata , Stream stream )
9696 {
9797 await WriteMetadataAsync ( metadata ) ;
9898
@@ -130,15 +130,15 @@ public virtual async Task WriteAsync(IMetadata metadata, Stream stream)
130130
131131 return metadata ;
132132 }
133- catch ( Exception ex )
133+ catch ( Exception ex )
134134 {
135135 Logger . LogWarning ( ex , $ "Reading metadata is failed for key \" { key } \" ") ;
136136
137- return null ; //simulate "not found". to recreate a new cached data.
137+ return null ; //simulate "not found" to recreate a new cached data.
138138 }
139139 }
140140
141- private async Task WriteMetadataAsync ( IMetadata metadata )
141+ private async Task WriteMetadataAsync ( Metadata metadata )
142142 {
143143 FileInfo metaFile = GetFileInfo ( FileType . Meta , metadata . Key ) ;
144144
@@ -156,7 +156,7 @@ private async Task WriteMetadataAsync(IMetadata metadata)
156156 await JsonSerializer . SerializeAsync ( metadataStream , metadata , ImageWizardJsonSerializerContext . Default . Metadata ) ;
157157 }
158158
159- private void Delete ( IMetadata metadata )
159+ private void Delete ( Metadata metadata )
160160 {
161161 FileInfo metaFile = GetFileInfo ( FileType . Meta , metadata . Key ) ;
162162 FileInfo blobFile = GetFileInfo ( FileType . Blob , metadata . Key ) ;
@@ -227,7 +227,7 @@ public virtual async Task CleanupAsync(CleanupReason reason, CancellationToken c
227227 using var w = await CacheLock . WriterLockAsync ( key ) ;
228228
229229 //read metadata
230- IMetadata ? metadata = await ReadMetadataAsync ( key ) ;
230+ Metadata ? metadata = await ReadMetadataAsync ( key ) ;
231231
232232 if ( metadata != null )
233233 {
@@ -248,7 +248,7 @@ public virtual async Task CleanupAsync(CleanupReason reason, CancellationToken c
248248
249249 public async Task SetLastAccessAsync ( string key , DateTime dateTime )
250250 {
251- IMetadata ? metadata = await ReadMetadataAsync ( key ) ;
251+ Metadata ? metadata = await ReadMetadataAsync ( key ) ;
252252
253253 if ( metadata == null )
254254 {
0 commit comments