module Session::RedisUtils

Overview

Utility methods for Redis operations to reduce code duplication

Defined in:

redis_utils.cr

Class Method Summary

Class Method Detail

def self.collect_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Array(String) #

Collect all keys matching a pattern


[View source]
def self.count_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Int64 #

Count all keys matching a pattern


[View source]
def self.delete_keys(client : Redis, pattern : String, batch_size : Int32 = 100) : Int64 #

Delete all keys matching a pattern


[View source]
def self.scan_keys(client : Redis, pattern : String, batch_size : Int32 = 100, &block : String -> Nil) #

Scan all keys matching a pattern and yield each key


[View source]