Add max_depth parameter to CommentPane cache key.

This commit is contained in:
Jason Harvey
2013-10-10 15:51:06 -07:00
parent f8ec402dba
commit 5cd9d0099e

View File

@@ -1294,7 +1294,8 @@ class CommentPane(Templated):
num, self.sort, self.num, c.lang,
self.can_reply, c.render_style,
c.user.pref_show_flair,
c.user.pref_show_link_flair]))
c.user.pref_show_link_flair,
self.max_depth]))
def __init__(self, article, sort, comment, context, num, **kw):
# keys: lang, num, can_reply, render_style
@@ -1310,6 +1311,8 @@ class CommentPane(Templated):
self.num = num
self.article = article
self.max_depth = kw.get('max_depth')
# don't cache on permalinks or contexts, and keep it to html
try_cache = not comment and not context and (c.render_style == "html")
self.can_reply = False