class
CQL::Cache::MemoryCache
- CQL::Cache::MemoryCache
- CQL::Cache::CacheInterface
- Reference
- Object
Overview
In-memory cache implementation with advanced features
Defined in:
cache/memory_cache.crConstructors
Instance Method Summary
-
#cleanup_expired : Int32
Maintenance operations
- #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
-
#get_version(key : String) : Int64 | Nil
Version-based operations
- #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 operations