View Source Glific.Caches (Glific v5.1.6)
Glific Cache management
Link to this section Summary
Functions
Get a cached value based on a key with fallback
Get a cached value based on a key
Retrieve a global value from the cache global scope
Set a global value, ttl is in number of hours For global keys, we expect relatively short ttls
Remove a value from the cache
Link to this section Functions
@spec fetch(non_neg_integer(), any(), (any() -> any())) :: {:ok | :error | :commit | :ignore, any()}
Get a cached value based on a key with fallback
@spec get(non_neg_integer(), any(), Keyword.t()) :: {:ok, any()} | {:ok, false}
Get a cached value based on a key
Retrieve a global value from the cache global scope
@spec put_global(any(), any(), non_neg_integer()) :: {:ok | :error, boolean()}
Set a global value, ttl is in number of hours For global keys, we expect relatively short ttls
@spec remove(non_neg_integer(), list()) :: any()
Remove a value from the cache