about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-18 19:54:23 +0100
committerGitHub <noreply@github.com>2019-03-18 19:54:23 +0100
commitb9a998f201913dd1c89ddcb0c4c9e181eb73bfcf (patch)
tree2d5705651ce83b73900ff3e2ce61d8fef1c1b25d /app/controllers/application_controller.rb
parent6e3a4bcbc70bb33bfb0746cf3b2186ee9f4e6515 (diff)
parent841b920af5de8e3188111ca4dbea0c5105bde88c (diff)
Merge pull request #963 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 0209805d0..5401b9d59 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -227,6 +227,11 @@ class ApplicationController < ActionController::Base
     response.headers['Vary'] = 'Accept'
   end
 
+  def mark_cacheable!
+    skip_session!
+    expires_in 0, public: true
+  end
+
   def skip_session!
     request.session_options[:skip] = true
   end