Skip to content

Commit

Permalink
Return updated state in the cache notification event when the registe…
Browse files Browse the repository at this point in the history
…red Hook is defined with a timeout value

Fixes #325
  • Loading branch information
feld authored and whitfin committed Jan 29, 2024
1 parent 5b8983e commit a876544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cachex/hook.ex
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ defmodule Cachex.Hook do
end)

case Task.yield(task, val) || Task.shutdown(task) do
{:ok, {:ok, new_state}} -> {:noreply, state}
{:ok, {:ok, new_state}} -> {:noreply, new_state}
nil -> {:noreply, state}
end
end
Expand Down

0 comments on commit a876544

Please sign in to comment.