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:
Brian Simpson
2015-07-14 20:12:07 -04:00
parent 9980fbb267
commit 409a5d8d46

View File

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