File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 55using Microsoft . Extensions . Internal ;
66using Microsoft . Extensions . Logging ;
77
8+ using Fido2NetLib . Serialization ;
9+
810namespace Fido2NetLib ;
911
1012public class DistributedCacheMetadataService : IMetadataService
@@ -103,7 +105,7 @@ protected virtual async Task StoreDistributedCachedBlob(IMetadataRepository repo
103105 {
104106 await _distributedCache . SetStringAsync (
105107 GetBlobCacheKey ( repository ) ,
106- JsonSerializer . Serialize ( payload ) ,
108+ JsonSerializer . Serialize ( payload , FidoModelSerializerContext . Default . MetadataBLOBPayload ) ,
107109 new DistributedCacheEntryOptions ( )
108110 {
109111 AbsoluteExpiration = GetDistributedCacheAbsoluteExpiryTime ( GetNextUpdateTimeFromPayload ( payload ) )
@@ -120,7 +122,7 @@ protected virtual async Task<MetadataBLOBPayload> GetDistributedCachedBlob(IMeta
120122 {
121123 try
122124 {
123- var cachedBlob = JsonSerializer . Deserialize < MetadataBLOBPayload > ( distributedCacheEntry ) ;
125+ var cachedBlob = JsonSerializer . Deserialize ( distributedCacheEntry , FidoModelSerializerContext . Default . MetadataBLOBPayload ) ;
124126 var nextUpdateTime = GetNextUpdateTimeFromPayload ( cachedBlob ) ;
125127
126128 //If the cache until time is in the past then update and return new data, otherwise return the cached value
You can’t perform that action at this time.
0 commit comments