mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-01 02:05:03 -05:00
Dual-write last modified timestamp for comments pages.
This commit is contained in:
@@ -39,6 +39,7 @@ from r2.lib.pages import FlairList, FlairCsv, FlairTemplateEditor, \
|
||||
FlairSelector
|
||||
from r2.lib.utils.trial_utils import indict, end_trial, trial_info
|
||||
from r2.lib.pages.things import wrap_links, default_thing_wrapper
|
||||
from r2.models.last_modified import LastModified
|
||||
|
||||
from r2.lib.menus import CommentSortMenu
|
||||
from r2.lib.captcha import get_iden
|
||||
@@ -920,6 +921,7 @@ class ApiController(RedditController):
|
||||
|
||||
if kind == 'link':
|
||||
set_last_modified(item, 'comments')
|
||||
LastModified.touch(item._fullname, 'Comments')
|
||||
|
||||
wrapper = default_thing_wrapper(expand_children = True)
|
||||
jquery(".content").replace_things(item, True, True, wrap = wrapper)
|
||||
|
||||
@@ -13,6 +13,7 @@ from r2.models.query_cache import (cached_query, merged_cached_query,
|
||||
MergedCachedQuery)
|
||||
from r2.models.query_cache import UserQueryCache, SubredditQueryCache
|
||||
from r2.models.query_cache import ThingTupleComparator
|
||||
from r2.models.last_modified import LastModified
|
||||
|
||||
import cPickle as pickle
|
||||
|
||||
@@ -1114,6 +1115,7 @@ def add_comment_tree(comments):
|
||||
data = True, return_dict = False)
|
||||
for link in links:
|
||||
set_last_modified(link, 'comments')
|
||||
LastModified.touch(link._fullname, 'Comments')
|
||||
|
||||
# amqp queue processing functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user