Skip to content

Commit 1949d1e

Browse files
committed
More obvious naming
The naming was taken from the library we consumed, rather than a sensible naming for users checking out the mu-cache for the first time. This new mu-cache handles naming much better.
1 parent 59831df commit 1949d1e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end
2020
# if you want to provide default values for your application for
2121
# 3rd-party users, it should be done in your "mix.exs" file.
2222

23-
config :use_plug_proxy,
23+
config :mu_cache,
2424
log_cache_keys: CH.system_boolean("LOG_CACHE_KEYS"),
2525
log_clear_keys: CH.system_boolean("LOG_CLEAR_KEYS")
2626

lib/use_plug_proxy.ex renamed to lib/mu_cache_plug.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
alias Cache.Registry, as: Cache
22

3-
defmodule UsePlugProxy do
3+
defmodule MuCachePlug do
44
@moduledoc """
55
Router for receiving cache requests.
66
"""
@@ -49,7 +49,7 @@ defmodule UsePlugProxy do
4949
end
5050

5151
defp maybe_log_clear_keys(clear_keys) do
52-
if Application.get_env(:use_plug_proxy, :log_clear_keys) do
52+
if Application.get_env(:mu_cache, :log_clear_keys) do
5353
# credo:disable-for-next-line Credo.Check.Warning.IoInspect
5454
IO.inspect(clear_keys, label: "Clear keys")
5555
end
@@ -58,7 +58,7 @@ defmodule UsePlugProxy do
5858
end
5959

6060
defp maybe_log_cache_keys(cache_keys) do
61-
if Application.get_env(:use_plug_proxy, :log_cache_keys) do
61+
if Application.get_env(:mu_cache, :log_cache_keys) do
6262
# credo:disable-for-next-line Credo.Check.Warning.IoInspect
6363
IO.inspect(cache_keys, label: "Cache keys")
6464
end

lib/mu_elixir_cache.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule MuElixirCache do
1111
{Cache.Registry, %{}},
1212
{Plug.Cowboy,
1313
scheme: :http,
14-
plug: UsePlugProxy,
14+
plug: MuCachePlug,
1515
options: [
1616
port: 80,
1717
protocol_options: [max_header_value_length: 409_600_000, max_keepalive: 1000]

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule UsePlugProxy.Mixfile do
33

44
def project do
55
[
6-
app: :use_plug_proxy,
6+
app: :mu_cache,
77
version: "2.0.2",
88
elixir: "~> 1.5",
99
build_embedded: Mix.env() == :prod,

0 commit comments

Comments
 (0)