plug_response_cache v0.1.1 PlugResponseCache.Store behaviour View Source
Link to this section Summary
Callbacks
Retrieve a response from the cache. If nothing was found, return a tuple with
:miss
and a reason, e.g. {:miss, :cold}
or {:miss, :expired}
Save a response to the cache. The second argument is an expiration time in the
UTC timezone. If a response should never expire, the expiration time is
:never
Link to this section Callbacks
Link to this callback
get(arg0)
View Source
get(Plug.Conn.t()) :: PlugResponseCache.hit() | PlugResponseCache.miss()
Retrieve a response from the cache. If nothing was found, return a tuple with
:miss
and a reason, e.g. {:miss, :cold}
or {:miss, :expired}
.
Link to this callback
set(arg0, arg1)
View Source
set(Plug.Conn.t(), PlugResponseCache.expire_time()) :: Plug.Conn.t()
Save a response to the cache. The second argument is an expiration time in the
UTC timezone. If a response should never expire, the expiration time is
:never
.