Used by websockets token authentication. Very short term cache to efficiently load ~30 websockets all at once for a single dashboard.
Summary
Functions
Returns a specification to start this module under a supervisor.
Return the value of a key in an idiomatic tuple
Similar to get, but call a function to lookup the value if it isn't in the cache.
Store anything for a certain amount of time or forever if no keep alive time specified
Retrieve anything by its key using the raw :ets.lookup call. less idiomatic than get, but includes rescue for unexpected results that raise an error, instead turning it into :error after logging the reason.
Count of items in the cache.
Start scheduling the works for clearing the cache. This method should be called before performing any operation.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Return the value of a key in an idiomatic tuple
Similar to get, but call a function to lookup the value if it isn't in the cache.
@spec insert(any(), any(), pos_integer() | :infinity) :: true | {:error, String.t()}
Store anything for a certain amount of time or forever if no keep alive time specified
Retrieve anything by its key using the raw :ets.lookup call. less idiomatic than get, but includes rescue for unexpected results that raise an error, instead turning it into :error after logging the reason.
Count of items in the cache.
Start scheduling the works for clearing the cache. This method should be called before performing any operation.
Returns {:ok, PID}.