module

Session::RedisUtils

Utility methods for Redis operations to reduce code duplication

Class methods

collect_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Array(String)

Collect all keys matching a pattern

Source
count_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Int64

Count all keys matching a pattern

Source
delete_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Int64

Delete all keys matching a pattern

Source
scan_keys(client : Redis, pattern : String, batch_size : Int32 = 100, &block : String -> Nil)

Scan all keys matching a pattern and yield each key

Source