FEATURE: no need to cap new and unread together anymore

- leave unread alone
- cap new at 500 per site, with a site setting
This commit is contained in:
Sam
2015-10-01 17:17:15 +10:00
parent 9bb7a3884b
commit 6f43b575a8
5 changed files with 2 additions and 38 deletions

View File

@@ -306,21 +306,6 @@ SQL
TopicUser.exec_sql(sql, user_id: user_id, count: count)
end
def self.unread_cap_key
"unread_cap_user".freeze
end
def self.cap_unread_later(user_id)
$redis.hset TopicUser.unread_cap_key, user_id, ""
end
def self.cap_unread_backlog!
$redis.hkeys(unread_cap_key).map(&:to_i).each do |user_id|
cap_unread!(user_id, (SiteSetting.max_tracked_new_unread * (2/5.0)).to_i)
$redis.hdel unread_cap_key, user_id
end
end
def self.ensure_consistency!(topic_id=nil)
update_post_action_cache(topic_id: topic_id)