ConCache.update
You're seeing just the function
update
, go back to ConCache module for more information.
Specs
update(t(), key(), update_fun()) :: :ok | {:error, any()}
Updates the item, or stores new item if it doesn't exist.
The update_fun
is invoked after the item is locked. Here, you can be certain
that no other process will update this item, unless they are doing dirty updates
or writing directly to the underlying ETS table. This function is not supported
by :bag
or :duplicate_bag
ETS tables.
The updater lambda must return one of the following:
{:ok, value}
- causes the value to be stored into the table{:error, reason}
- the value won't be stored and{:error, reason}
will be returned