class Zap::Utils::Fetch::Cache::InMemory(T)

Defined in:

utils/fetch/cache.cr

Constructors

Instance Method Summary

Instance methods inherited from class Zap::Utils::Fetch::Cache(T)

get(key_str : String, etag : String | Nil) : T | Nil
get(key_str : String, &etag : -> String | Nil) : T | Nil
get
, set(key_str : String, value : T, expiry : Time::Span | Nil, etag : String | Nil) : Nil set

Class methods inherited from class Zap::Utils::Fetch::Cache(T)

hash(str) hash

Instance methods inherited from class Object

or(other : T) : T | self forall T or, pipe(&) pipe

Constructor Detail

def self.new(fallback : Cache(T) | Nil = nil) #

[View source]

Instance Method Detail

def get(key_str : String, etag : String | Nil = nil, *, fallback = true) : T | Nil #

[View source]
def get(key_str : String, *, fallback = true, &etag : -> String | Nil) : T | Nil #

[View source]
def set(key_str : String, value : T, expiry : Time::Span | Nil = nil, etag : String | Nil = nil, *, fallback = true) : Nil #

[View source]