From f7cea6385bd956faa398fd66438d89780a754289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Meadows-J=C3=B6nsson?= Date: Mon, 3 Jun 2024 14:58:15 +0200 Subject: [PATCH] Improve cache usage --- lib/hex/registry/server.ex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/hex/registry/server.ex b/lib/hex/registry/server.ex index 60ff2484..a178ca56 100644 --- a/lib/hex/registry/server.ex +++ b/lib/hex/registry/server.ex @@ -394,12 +394,8 @@ defmodule Hex.Registry.Server do end defp write_result(other, repo, package, %{ets: tid}) do - cached? = !!:ets.lookup(tid, {:versions, package}) + cached? = :ets.lookup(tid, {:versions, repo, package}) != [] print_error(other, repo, package, cached?) - - unless cached? do - raise "Stopping due to errors" - end end defp print_error(result, repo, package, cached?) do