From cb5c648390aabf3345950ca79cf868962da5d623 Mon Sep 17 00:00:00 2001 From: Anthony Shull Date: Tue, 2 Jan 2024 15:53:09 -0600 Subject: [PATCH] cache get paragraph because it also handles redirects --- apps/cms/lib/repo.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/cms/lib/repo.ex b/apps/cms/lib/repo.ex index dc6be01884..9dc911947d 100644 --- a/apps/cms/lib/repo.ex +++ b/apps/cms/lib/repo.ex @@ -384,6 +384,7 @@ defmodule CMS.Repo do Paragraphs are stand-alone partials from the CMS. Supports redirects. """ @spec get_paragraph(String.t(), map) :: Paragraph.t() | {:error, any()} + @decorate cacheable(cache: @cache, on_error: :nothing, opts: [ttl: @ttl]) def get_paragraph(path, query_params \\ %{}) do case view_or_preview(path, query_params) do {:ok, api_data} ->