Add some caching for HTML versions of statuses pages (#10701)
parent
fc40391743
commit
4870d7f122
|
@ -27,7 +27,10 @@ class StatusesController < ApplicationController
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
mark_cacheable! unless user_signed_in?
|
unless user_signed_in?
|
||||||
|
skip_session!
|
||||||
|
expires_in 10.seconds, public: true
|
||||||
|
end
|
||||||
|
|
||||||
@body_classes = 'with-modals'
|
@body_classes = 'with-modals'
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ class StreamEntriesController < ApplicationController
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
|
unless user_signed_in?
|
||||||
|
skip_session!
|
||||||
|
expires_in 5.minutes, public: true
|
||||||
|
end
|
||||||
|
|
||||||
redirect_to short_account_status_url(params[:account_username], @stream_entry.activity) if @type == 'status'
|
redirect_to short_account_status_url(params[:account_username], @stream_entry.activity) if @type == 'status'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue