class Zap::Utils::Fetch::Cache::InStore(T)
Defined in:
utils/fetch/cache.crConstant Summary
-
BODY_FILE_NAME =
"body"
-
BODY_FILE_NAME_TEMP =
"body.temp"
-
META_FILE_NAME =
"meta"
-
META_FILE_NAME_TEMP =
"meta.temp"
Constructors
Instance Method Summary
- #get(key_str : String, etag : String | Nil = nil) : T | Nil
- #get(key_str : String, &get_etag : -> String | Nil) : T | Nil
- #set(key_str : String, value : T, expiry : Time::Span | Nil = nil, etag : String | Nil = nil) : Nil
Instance methods inherited from class Zap::Utils::Fetch::Cache(T)
get(key_str : String, etag : String | Nil) : T | Nilget(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(store_path, *, serializer : Serializer(T), bypass_staleness_checks : Bool = false, raise_on_cache_miss : Bool = false)
#
Instance Method Detail
def set(key_str : String, value : T, expiry : Time::Span | Nil = nil, etag : String | Nil = nil) : Nil
#