Skip to content

Commit bc56111

Browse files
committed
fix expired entries deletion timer
Check every 3 seconds and not every 3 milliseconds. Signed-off-by: Matteo Cafasso <[email protected]>
1 parent c9582ef commit bc56111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cache.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ defmodule RabbitMQ.Cache do
5656

5757
:ok = cache_create(cache, options)
5858

59-
Process.send_after(cache, {:cache, cache}, 3)
59+
Process.send_after(cache, {:cache, cache}, 3000)
6060

6161
{:ok, %{}}
6262
end
6363

6464
def handle_info({:cache, cache}, state) do
6565
{_, result} = cache_delete_expired(cache)
6666
if (result == :ok) do
67-
Process.send_after(cache, {:cache, cache}, 3)
67+
Process.send_after(cache, {:cache, cache}, 3000)
6868
end
6969

7070
{:noreply, state}

0 commit comments

Comments
 (0)