diff --git a/CHANGELOG.md b/CHANGELOG.md index af4d010..0ea79c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 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 + # 0.3.0 - Big fixes for caching not applying all the time - Content type fixes to respect different forms of responses diff --git a/config/config.exs b/config/config.exs index 08b7573..f80aaa5 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: [], + cached_errors: :all, 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 1a38a15..e8bc836 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) || [] + Application.get_env(@app, :cached_errors) || :all end def request_cache_module do diff --git a/mix.exs b/mix.exs index e63ef92..1667df3 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule RequestCache.MixProject do def project do [ app: :request_cache_plug, - version: "0.3.0", + version: "0.4.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,