Skip to content

Commit

Permalink
Use put instead of put_new
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Apr 25, 2024
1 parent bdc2d73 commit 145309e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/phoenix/config.ex
Expand Up @@ -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 """
Expand Down
2 changes: 1 addition & 1 deletion lib/phoenix/endpoint/supervisor.ex
Expand Up @@ -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, _} ->
Expand Down

0 comments on commit 145309e

Please sign in to comment.