【发布时间】:2015-09-29 14:13:30
【问题描述】:
我在我的项目中使用 Redis 缓存。现在有一种情况,缓存是动态生成的,比如“KeyPrefix”+i i是动态值
现在我想删除所有前缀为“KeyPrefix”的键
在我的代码中我只能删除匹配的键。但我需要删除所有包含某些前缀的键。
IDatabase cache = RedisDistributedCacheManager.GetDatabase();
cache.KeyDelete(cacheKey);
谢谢 达尔维尔
【问题讨论】:
标签: c# caching redis invalidation stackexchange.redis