mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-24 06:18:08 -05:00
Remove unused c.allow_loggedin_cache
This hasn't been used on reddit.com since recent changes to how stylesheets are served, and loggedin responses cannot be safely cached by a downstream proxy anymore.
This commit is contained in:
committed by
Neil Williams
parent
597ecd6e20
commit
39160007d3
@@ -464,8 +464,6 @@ class FrontController(RedditController):
|
||||
stylesheet_contents = c.site.stylesheet_contents_secure
|
||||
|
||||
if stylesheet_contents:
|
||||
c.allow_loggedin_cache = True
|
||||
|
||||
if c.site.stylesheet_modified:
|
||||
self.abort_if_not_modified(
|
||||
c.site.stylesheet_modified,
|
||||
|
||||
@@ -1031,7 +1031,6 @@ class MinimalController(BaseController):
|
||||
ratelimit_throttled()
|
||||
ratelimit_agents()
|
||||
|
||||
c.allow_loggedin_cache = False
|
||||
c.allow_framing = False
|
||||
|
||||
c.cdn_cacheable = (request.via_cdn and
|
||||
@@ -1106,7 +1105,7 @@ class MinimalController(BaseController):
|
||||
wrapped_content = c.response_wrapper(content)
|
||||
response.content = wrapped_content
|
||||
|
||||
if c.user_is_loggedin and not c.allow_loggedin_cache:
|
||||
if c.user_is_loggedin:
|
||||
response.headers['Cache-Control'] = 'no-cache'
|
||||
response.headers['Pragma'] = 'no-cache'
|
||||
|
||||
@@ -1572,7 +1571,7 @@ class RedditController(OAuth2ResourceController):
|
||||
must_revalidate=True):
|
||||
"""Check If-Modified-Since and abort(304) if appropriate."""
|
||||
|
||||
if c.user_is_loggedin and not c.allow_loggedin_cache:
|
||||
if c.user_is_loggedin:
|
||||
return
|
||||
|
||||
# HTTP timestamps round to nearest second. truncate this value for
|
||||
|
||||
Reference in New Issue
Block a user