public void StringAdd <K, V>(CacheUnitModel cacheUnitModel, K key, V value) { var redisValue = RedisValueKeyHelper.ToValue(value); var redisKey = RedisValueKeyHelper.ToKey(key); _redisRepository.StringAdd(cacheUnitModel.DataBaseIndex, redisKey, redisValue, cacheUnitModel.Expire, cacheUnitModel.GetWhen()); }
public void HashSetAdd <K, KeyFiled, V>(CacheUnitModel cacheUnitModel, K key, KeyFiled filed, V value) { var keyValue = RedisValueKeyHelper.ToKey(key); var fileKey = RedisValueKeyHelper.ToValue(filed); var redisValue = RedisValueKeyHelper.ToValue(value); _redisRepository.HashSetAdd(cacheUnitModel.DataBaseIndex, keyValue, fileKey, redisValue, cacheUnitModel.Expire, cacheUnitModel.GetWhen()); }