Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 27195d5

Browse files
committed
Implement new ICacheClientExtended.GetKeysByPattern
1 parent a665b67 commit 27195d5

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

lib/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

lib/tests/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

src/ServiceStack.Redis/RedisClientManagerCacheClient.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,5 +207,13 @@ public void RemoveByRegex(string pattern)
207207
}
208208
return null;
209209
}
210+
211+
public IEnumerable<string> GetKeysByPattern(string pattern)
212+
{
213+
using (var client = (RedisClient)GetClient())
214+
{
215+
return client.GetKeysByPattern(pattern);
216+
}
217+
}
210218
}
211219
}

src/ServiceStack.Redis/RedisClient_Set.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,10 @@ public string GetRandomItemFromSet(string setId)
203203
{
204204
return SRandMember(setId).FromUtf8Bytes();
205205
}
206+
207+
public IEnumerable<string> GetKeysByPattern(string pattern)
208+
{
209+
return ScanAllKeys(pattern);
210+
}
206211
}
207212
}

0 commit comments

Comments
 (0)