public static async IAsyncEnumerable <string> GetKeysStartingWithAsync(this ICacheClientAsync cache, string prefix) { await foreach (var key in cache.GetKeysByPatternAsync(prefix + "*")) { yield return(key); } }
#pragma warning disable CS8425 public async IAsyncEnumerable <string> GetKeysByPatternAsync(string pattern, CancellationToken token = default) { await foreach (var key in cache.GetKeysByPatternAsync(EnsurePrefix(pattern), token)) { yield return(key); } }
public static async IAsyncEnumerable <string> GetAllKeysAsync(this ICacheClientAsync cache) { await foreach (var key in cache.GetKeysByPatternAsync("*")) { yield return(key); } }
public static IAsyncEnumerable <string> GetKeysByPatternAsync(this ICacheClientAsync cache, string pattern) { return(cache.GetKeysByPatternAsync(pattern)); }
public async Task <IEnumerable <string> > GetKeysByPatternAsync(string pattern, CancellationToken token = default) { return(await cache.GetKeysByPatternAsync(EnsurePrefix(pattern), token).ConfigAwait()); }
public static async Task <IEnumerable <string> > GetKeysStartingWithAsync(this ICacheClientAsync cache, string prefix) { return(await cache.GetKeysByPatternAsync(prefix + "*")); }
public static async Task <IEnumerable <string> > GetAllKeysAsync(this ICacheClientAsync cache) { return(await cache.GetKeysByPatternAsync("*")); }