Skip to content

Commit

Permalink
Add location to pagecache key.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsimpson63 committed Jun 9, 2014
1 parent e68a715 commit 6964599
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions r2/r2/controllers/reddit_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
FakeSubreddit,
Friends,
Frontpage,
get_request_location,
LabeledMulti,
Link,
Mod,
Expand Down Expand Up @@ -756,6 +757,11 @@ def request_key(self):
except CookieError:
cookies_key = ''

if request.host != g.media_domain:
location = get_request_location()
else:
location = None

return make_key('request',
c.lang,
c.content_langs,
Expand All @@ -766,6 +772,7 @@ def request_key(self):
c.over18,
c.extension,
c.render_style,
location,
cookies_key)

def cached_response(self):
Expand Down

0 comments on commit 6964599

Please sign in to comment.