From e4a682394173a4b5a2ef8885eb5b2a33cd53e3e0 Mon Sep 17 00:00:00 2001 From: MikaAK Date: Tue, 26 Sep 2023 15:20:23 -0700 Subject: [PATCH] chore: disable caching all errors and bump to 1.0.0 --- CHANGELOG.md | 3 +++ config/config.exs | 2 +- lib/request_cache/config.ex | 2 +- mix.exs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea79c8..d16eb38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/config/config.exs b/config/config.exs index f80aaa5..08b7573 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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, diff --git a/lib/request_cache/config.ex b/lib/request_cache/config.ex index e8bc836..1a38a15 100644 --- a/lib/request_cache/config.ex +++ b/lib/request_cache/config.ex @@ -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 diff --git a/mix.exs b/mix.exs index 1667df3..54546b8 100644 --- a/mix.exs +++ b/mix.exs @@ -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,