-
-
Save alfredoPacheco/6d8c9c68197aa29a7bd64cfe02b6bc53 to your computer and use it in GitHub Desktop.
Redis RemoveAll repro Fork
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using ServiceStack; | |
using ServiceStack.Text; | |
using ServiceStack.Redis; | |
using ServiceStack.DataAnnotations; | |
using ServiceStack.Caching; | |
var redisManager = new RedisManagerPool("localhost:6379"); | |
var redis = redisManager.GetClient(); | |
redis.FlushAll(); | |
var cache = redisManager.GetCacheClient().WithPrefix("sample"); | |
cache.Set("siafracc_QUERY_Deposit__Query_Deposit_10_1", "A"); | |
cache.Set("siafracc_QUERY_Deposit__0_1___CUSTOM", "A"); | |
var keys = cache.GetKeysStartingWith("siafracc_QUERY_Deposit"); | |
cache.RemoveAll(keys); | |
var newKeys = cache.GetKeysStartingWith("siafracc_QUERY_Deposit"); | |
"oldKeys:".Print(); | |
keys.PrintDump(); | |
"newKeys:".Print(); | |
newKeys.PrintDump(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="System.Memory" version="4.5.4" targetFramework="net45" /> | |
<package id="ServiceStack.Text" version="5.9.0" targetFramework="net45" /> | |
<package id="ServiceStack.Client" version="5.9.0" targetFramework="net45" /> | |
<package id="ServiceStack.Interfaces" version="5.9.0" targetFramework="net45" /> | |
<package id="ServiceStack.Redis" version="5.9.0" targetFramework="net45" /> | |
<package id="ServiceStack" version="5.9.0" targetFramework="net45" /> | |
</packages> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment