]> cat aescling's git repositories - mastodon.git/commit
Reduce server load caused by anonymous viewing. (#9059)
authorBen Lubar <ben.lubar+github@gmail.com>
Sun, 17 Mar 2019 14:39:25 +0000 (09:39 -0500)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 17 Mar 2019 14:39:25 +0000 (15:39 +0100)
commitc3d1594576227fcbc45d1da97f474acbd23d831b
treee3548d2ea61c67cfdd414cf72ea80382c31992b5
parenta20354a20b9dffada0e8d6170ebc2ff13c79baea
Reduce server load caused by anonymous viewing. (#9059)

Do not start a session if the current user is not logged in for public-facing pages.

Mark pages that don't care about sessions as publicly cacheable.

Keep the max age as 0 so proxies and browsers will still try to retrieve an updated version but can still fall back to the stale version if the site is down or too slow.

Fixes #9035.
app/controllers/accounts_controller.rb
app/controllers/application_controller.rb
app/controllers/follower_accounts_controller.rb
app/controllers/statuses_controller.rb