예제 #1
0
        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());
        }
예제 #2
0
        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);
        }