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:
Jordan Milne
2014-08-08 13:20:12 -03:00
committed by Neil Williams
parent 597ecd6e20
commit 39160007d3
2 changed files with 2 additions and 5 deletions

View File

@@ -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,

View File

@@ -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