Quantcast
Channel: StackExchange.Redis Scan x amount of keys - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by AussieJoe for StackExchange.Redis Scan x amount of keys

$
0
0

I would use the .Take() method, outlined by Microsoft here.

Returns a specified number of contiguous elements from the start of a sequence.

It would look something like this:

//limit to 100
var keysArr = keys.Select(key => (string)key).Take(100).ToArray();

Viewing all articles
Browse latest Browse all 3

Trending Articles