diff --git a/lib/towerops/agents/agent_cache.ex b/lib/towerops/agents/agent_cache.ex index c5651387..4dd4b864 100644 --- a/lib/towerops/agents/agent_cache.ex +++ b/lib/towerops/agents/agent_cache.ex @@ -105,21 +105,4 @@ defmodule Towerops.Agents.AgentCache do defp schedule_cleanup do Process.send_after(self(), :cleanup_expired, 60_000) end - - @impl GenServer - def handle_info(:cleanup_expired, state) do - now = System.monotonic_time(:millisecond) - # Delete all device cache entries that have expired - :ets.select_delete(@table, [ - {{{:device, :_}, :_, :"$1"}, [{:<, :"$1", now}], [true]} - ]) - - schedule_cleanup() - {:noreply, state} - end - - defp schedule_cleanup do - # Run cleanup every minute - Process.send_after(self(), :cleanup_expired, 60_000) - end end