mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
CachedTemplate: use c.site.user_path in cache key.
LabeledMulti has a different effective path for the owner and for other viewers. This effects the urls used in buttons on the page.
This commit is contained in:
@@ -459,9 +459,17 @@ class CachedTemplate(Templated):
|
||||
# these values are needed to render any link on the site, and
|
||||
# a menu is just a set of links, so we best cache against
|
||||
# them.
|
||||
keys = [c.user_is_loggedin, c.user_is_admin, c.domain_prefix,
|
||||
style, c.secure, c.cname, c.lang, c.site.path,
|
||||
self.template_hash(style)]
|
||||
keys = [
|
||||
c.user_is_loggedin,
|
||||
c.user_is_admin,
|
||||
c.domain_prefix,
|
||||
style,
|
||||
c.secure,
|
||||
c.cname,
|
||||
c.lang,
|
||||
c.site.user_path,
|
||||
self.template_hash(style),
|
||||
]
|
||||
|
||||
if c.secure:
|
||||
keys.append(request.host)
|
||||
|
||||
Reference in New Issue
Block a user