We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbbc614 commit 29fdac5Copy full SHA for 29fdac5
Enyim.Caching/MemcachedClient.cs
@@ -214,18 +214,11 @@ public async Task<T> GetValueAsync<T>(string key)
214
215
public async Task<T> GetValueOrCreateAsync<T>(string key, int cacheSeconds, Func<Task<T>> generator)
216
{
217
- try
218
- {
219
- var result = await GetAsync<T>(key);
220
- if (result.Success)
221
222
- _logger.LogDebug($"Cache is hint. Key is '{key}'.");
223
- return result.Value;
224
- }
225
226
- catch (Exception ex)
+ var result = await GetAsync<T>(key);
+ if (result.Success)
227
228
- _logger.LogError(ex, $"{nameof(GetAsync)}<{typeof(T)}>(\"{key}\")");
+ _logger.LogDebug($"Cache is hint. Key is '{key}'.");
+ return result.Value;
229
}
230
231
_logger.LogDebug($"Cache is missed. Key is '{key}'.");
0 commit comments