Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 20e48c6

Browse files
committed
Refactoring RedisCache
1 parent fff730b commit 20e48c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NET6CustomLibrary/RedisCache/Services/CacheService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public async Task<T> GetCacheAsync<T>(string key)
2020
return default;
2121
}
2222

23-
return System.Text.Json.JsonSerializer.Deserialize<T>(jsonData);
23+
return JsonSerializer.Deserialize<T>(jsonData);
2424
}
2525

2626
public async Task<T> SetCacheAsync<T>(string key, T value)
@@ -32,7 +32,7 @@ public async Task<T> SetCacheAsync<T>(string key, T value)
3232
SlidingExpiration = optionsCache.SlidingExpireTime
3333
};
3434

35-
var jsonData = System.Text.Json.JsonSerializer.Serialize(value);
35+
var jsonData = JsonSerializer.Serialize(value);
3636

3737
await cache.SetStringAsync(key, jsonData, options);
3838

0 commit comments

Comments
 (0)