From 145309e014cf329b4d887f0c2f12effcd6bf7864 Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Thu, 25 Apr 2024 19:55:10 -0400 Subject: [PATCH] Use put instead of put_new --- lib/phoenix/config.ex | 4 ++-- lib/phoenix/endpoint/supervisor.ex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/phoenix/config.ex b/lib/phoenix/config.ex index fc9ed22ed9..3b6dde435e 100644 --- a/lib/phoenix/config.ex +++ b/lib/phoenix/config.ex @@ -20,8 +20,8 @@ defmodule Phoenix.Config do @doc """ Puts a given key-value pair in config. """ - def put_new(module, key, value) do - :ets.insert_new(module, {key, value}) + def put(module, key, value) do + :ets.insert(module, {key, value}) end @doc """ diff --git a/lib/phoenix/endpoint/supervisor.ex b/lib/phoenix/endpoint/supervisor.ex index f8d315dbd4..253db8c9cb 100644 --- a/lib/phoenix/endpoint/supervisor.ex +++ b/lib/phoenix/endpoint/supervisor.ex @@ -381,7 +381,7 @@ defmodule Phoenix.Endpoint.Supervisor do end defp warmup_static(endpoint, %{"latest" => latest, "digests" => digests}) do - Phoenix.Config.put_new(endpoint, :cache_static_manifest_latest, latest) + Phoenix.Config.put(endpoint, :cache_static_manifest_latest, latest) with_vsn? = !endpoint.config(:cache_manifest_skip_vsn) Enum.each(latest, fn {key, _} ->