class
Azu::Cache::Manager
- Azu::Cache::Manager
- Reference
- Object
Overview
Main cache interface
Defined in:
azu/cache.crConstructors
Instance Method Summary
- #clear : Bool
- #config : Configuration
- #decrement(key : String, amount : Int32 = 1, ttl : Time::Span | Nil = nil) : Int32 | Nil
- #delete(key : String) : Bool
- #exists?(key : String) : Bool
- #fetch(key : String, ttl : Time::Span | Nil = nil, & : -> String) : String
-
#get(key : String) : String | Nil
Rails-like API methods with optional performance metrics
-
#get(key : String, ttl : Time::Span | Nil = nil, & : -> String) : String
Overloaded get method with block and TTL support (Rails-like)
-
#get_multi(keys : Array(String)) : Hash(String, String | Nil)
Multi-key operations
-
#increment(key : String, amount : Int32 = 1, ttl : Time::Span | Nil = nil) : Int32 | Nil
Counter operations
-
#ping : String | Nil
Redis-specific methods (only available when using Redis store)
- #redis_info : Hash(String, String) | Nil
- #set(key : String, value : String, ttl : Time::Span | Nil = nil) : Bool
- #set_multi(values : Hash(String, String), ttl : Time::Span | Nil = nil) : Bool
- #size : Int32
-
#stats : Hash(String, Int32 | Float64 | String)
Utility methods
- #store : Store
Constructor Detail
Instance Method Detail
def get(key : String, ttl : Time::Span | Nil = nil, & : -> String) : String
#
Overloaded get method with block and TTL support (Rails-like)
Counter operations