Example #1
0
        public async Task Remove()
        {
            string key             = "StringIncrement";
            var    stringIncrement = _redisDatabase.StringIncrement(key);
            var    result          = await _redisDatabase.RemoveAsync(key);

            Assert.AreEqual(1, result);
        }
        /// <summary>
        /// 根据key删除缓存
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <ResponseResult <long> > RemoveAsync(uint id)
        {
            var result = await _redisManager.RemoveAsync($"RedisOption:Id{id}");

            return(new ResponseResult <long>
            {
                Result = result,
            });
        }