Sharing: Force links to include the feature flag in the cache key.

This commit is contained in:
Matt Lee
2015-06-01 15:43:14 -07:00
parent 20bdb3bbd1
commit c20aef70ca

View File

@@ -20,6 +20,7 @@
# Inc. All Rights Reserved.
###############################################################################
from r2.config import feature
from r2.lib.db.thing import (
Thing, Relation, NotFound, MultiRelation, CreationError)
from r2.lib.db.operators import desc
@@ -496,6 +497,8 @@ class Link(Thing, Printable):
item.nsfw_str)
item.nsfw = item.over_18 and user.pref_label_nsfw
item.show_new_post_sharing = feature.is_enabled('improved_sharing')
item.is_author = (user == item.author)
item.thumbnail_sprited = False