/// <summary> /// Initializes a new instance of the <see cref="RedisObjectCache" /> class. /// </summary> /// <param name="context">上下文</param> public RedisObjectCache(ICacheContext context) { Context = context; _redisDatabase = Context.OfRedis().ObjectCacheDatabase; HashKeyCache <byte> .KeyConvertor = key => key; HashKeyCache <short> .KeyConvertor = key => key; HashKeyCache <int> .KeyConvertor = key => key; HashKeyCache <long> .KeyConvertor = key => key; HashKeyCache <string> .KeyConvertor = key => key; HashKeyCache <bool> .KeyConvertor = key => key; HashKeyCache <char> .KeyConvertor = key => key; HashKeyCache <double> .KeyConvertor = key => key; HashKeyCache <float> .KeyConvertor = key => key; }