diff --git a/EnvelopeGenerator.Application/Extensions/CacheExtensions.cs b/EnvelopeGenerator.Application/Extensions/CacheExtensions.cs index d8986131..45f43109 100644 --- a/EnvelopeGenerator.Application/Extensions/CacheExtensions.cs +++ b/EnvelopeGenerator.Application/Extensions/CacheExtensions.cs @@ -33,7 +33,7 @@ namespace EnvelopeGenerator.Application.Extensions return value is null ? null : new(BitConverter.ToInt64(value, 0)); } - public static string GetOrCreate(this IDistributedCache cache, string key, Func factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default) + public static string GetOrSet(this IDistributedCache cache, string key, Func factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default) { var value = cache.GetString(key); if (value is null) @@ -58,7 +58,7 @@ namespace EnvelopeGenerator.Application.Extensions return value; } - public static async Task GetOrCreateAsync(this IDistributedCache cache, string key, Func> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default) + public static async Task GetOrSetAsync(this IDistributedCache cache, string key, Func> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default) { var value = await cache.GetStringAsync(key, token: token); if(value is null)