class Armature::Cache::RedisStore

Included Modules

Defined in:

cache/redis.cr

Constructors

Instance Method Summary

Instance methods inherited from module Armature::Cache::CacheStore

[]=(key : String, value : T) : Nil forall T []=, []?(key : String, as type : T.class) forall T []?, delete(key : String) : Nil delete, fetch(key : String, expires_in duration : Time::Span | Nil, & : -> T) forall T fetch, write(key : String, value : T, expires_in : Time::Span | Nil) forall T write

Constructor Detail

def self.new(redis : Redis::Client, default_expiration : Time::Span = 1.day, log : Log = Log.for("armature.cache")) #

[View source]

Instance Method Detail

def []?(key : String, as type : T.class) : T | Nil forall T #

[View source]
def delete(key : String) : Nil #

[View source]
def fetch_all(keys : Array(String), as type : T.class) : Array(T | Nil) forall T #

[View source]
def write(key : String, value : T, expires_in duration : Time::Span | Nil) forall T #

[View source]