abstract class
CQL::Cache::CacheInterface
- CQL::Cache::CacheInterface
- Reference
- Object
Overview
Interface defining the contract for cache implementations Provides a common API for different cache backends (memory, Redis, etc.)
Direct Known Subclasses
Defined in:
cache/cache_interface.crInstance Method Summary
- #clear : Bool
- #delete(key : String) : Bool
- #delete_multi(keys : Array(String)) : Int32
- #exists?(key : String) : Bool
-
#get(key : String) : String | Nil
Basic cache operations
-
#get_multi(keys : Array(String)) : Hash(String, String | Nil)
Batch operations for efficiency
-
#get_version(key : String) : Int64 | Nil
Version-based invalidation support
- #increment_version(key : String) : Int64
- #invalidate_tags(tags : Array(String)) : Int32
- #set(key : String, value : String, ttl : Time::Span | Nil = nil) : Bool
- #set_multi(data : Hash(String, String), ttl : Time::Span | Nil = nil) : Bool
- #size : Int32
-
#stats : Hash(String, String | Int32 | Int64 | Float64)
Statistics and monitoring
-
#tag_cache(key : String, tags : Array(String)) : Bool
Tag-based invalidation support
Instance Method Detail
abstract
def get_multi(keys : Array(String)) : Hash(String, String | Nil)
#
Batch operations for efficiency
abstract
def set_multi(data : Hash(String, String), ttl : Time::Span | Nil = nil) : Bool
#