This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Add some caching for HTML versions of statuses pages (
#10701
)
pull/4/head
ThibG
5 years ago
committed by
Eugen Rochko
parent
0402c52f28
commit
26fc21c188
2 changed files
with
9 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-1
app/controllers/statuses_controller.rb
+5
-0
app/controllers/stream_entries_controller.rb
+ 4
- 1
app/controllers/statuses_controller.rb
View File
@ -27,7 +27,10 @@ class StatusesController < ApplicationController
def
show
respond_to
do
|
format
|
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'
+ 5
- 0
app/controllers/stream_entries_controller.rb
View File
@ -15,6 +15,11 @@ class StreamEntriesController < ApplicationController
def
show
respond_to
do
|
format
|
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'
end
Write
Preview
Loading…
Cancel
Save