private static string GetKey(Expression expression, params object[] keyParams) { string key; try { key = new ExpressionCacheKeyGenerator(expression).GetKey(keyParams); } catch (TargetInvocationException) { key = new StringCacheKeyGenerator().GetKey(keyParams); } return(key.ToMd5Hash()); }
private string GetKey(Expression expression, params object[] keyParams) { string key; try { key = new ExpressionCacheKeyGenerator(expression).GetKey(keyParams); } catch (TargetInvocationException) { key = new StringCacheKeyGenerator().GetKey(keyParams); } key = $"Query:{key.ToMd5Hash()}"; _logger.LogDebug($"get cache key: {key}"); return(key); }