Skip to content

Commit

Permalink
chore: disable caching all errors and bump to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Sep 26, 2023
1 parent d451743 commit 173db09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.0.0
- turn off caching errors by default, you must tune errors to `:all` to retain prior behaviour

# 0.4.0
- add whitelist for specific query names for caching instead of caching all, default all still cached
- add ability to tune caching errors, default all still cached
Expand Down
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Config
config :request_cache_plug,
enabled?: true,
verbose?: false,
cached_errors: :all,
cached_errors: [],
graphql_paths: ["/graphiql", "/graphql"],
conn_priv_key: :__shared_request_cache__,
request_cache_module: RequestCache.ConCacheStore,
Expand Down
2 changes: 1 addition & 1 deletion lib/request_cache/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule RequestCache.Config do
end

def cached_errors do
Application.get_env(@app, :cached_errors) || :all
Application.get_env(@app, :cached_errors) || []
end

def request_cache_module do
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule RequestCache.MixProject do
def project do
[
app: :request_cache_plug,
version: "0.4.0",
version: "1.0.0",
elixir: "~> 1.12",
description: "Plug to cache requests declaratively for either GraphQL or Phoenix, this plug is intended to short circuit all json/decoding or parsing a server would normally do",
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 173db09

Please sign in to comment.