From 3812f7ba8f45ba9705f3d0c3ec61731bfa9ff818 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 28 Aug 2012 15:39:26 -0700 Subject: [PATCH] Comment Pane Cache: disable caching for the author of the link. --- r2/r2/lib/pages/pages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index c4d89a89a..2554cce4d 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -1049,6 +1049,11 @@ class CommentPane(Templated): self.can_reply = False if c.user_is_admin: try_cache = False + + # don't cache if the current user is the author of the link + if c.user_is_loggedin and c.user._id == article.author_id: + try_cache = False + if try_cache and c.user_is_loggedin: sr = article.subreddit_slow c.can_reply = self.can_reply = sr.can_comment(c.user)