From e7fec734353f98b3eccea2458378b811eb7fde70 Mon Sep 17 00:00:00 2001 From: Christopher Guess Date: Wed, 18 Sep 2024 20:29:27 -0400 Subject: [PATCH] Add action caching to public stuff --- Gemfile | 4 ++-- Gemfile.lock | 6 +++--- app/controllers/public_access/media_controller.rb | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index f69af7ef..1b7be7c8 100644 --- a/Gemfile +++ b/Gemfile @@ -256,5 +256,5 @@ gem "async", "2.12.0" gem "activegraph" # For example, see https://rubygems.org/gems/activegraph/versions for the latest versions gem "neo4j-ruby-driver" -# We want to manage our meta tags for publically available pages -gem "meta-tags" +# Caching +gem "actionpack-action_caching" diff --git a/Gemfile.lock b/Gemfile.lock index 93c6ac84..2543c969 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,6 +108,8 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionpack-action_caching (1.2.2) + actionpack (>= 4.0.0) actiontext (7.0.8) actionpack (= 7.0.8) activerecord (= 7.0.8) @@ -351,8 +353,6 @@ GEM webrick (~> 1.7) webrobots (~> 0.1.2) memory_profiler (1.0.1) - meta-tags (2.22.0) - actionpack (>= 6.0.0, < 8.1) method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) @@ -709,6 +709,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + actionpack-action_caching activegraph amazing_print async (= 2.12.0) @@ -744,7 +745,6 @@ DEPENDENCIES mailgun-ruby (~> 1.2) mechanize memory_profiler - meta-tags minitest-hooks neo4j-ruby-driver os diff --git a/app/controllers/public_access/media_controller.rb b/app/controllers/public_access/media_controller.rb index 6043697c..b8559a93 100644 --- a/app/controllers/public_access/media_controller.rb +++ b/app/controllers/public_access/media_controller.rb @@ -1,4 +1,6 @@ class PublicAccess::MediaController < ApplicationController + caches_action :index, :show + sig { void } def index @page_metadata = { title: "Archive", description: "Archive" }