multi stream hotfix (re: cache)

This commit is contained in:
danielgrippi 2011-11-07 12:15:24 -08:00
parent b53df6dd4d
commit 8da1d6a7fc
3 changed files with 5 additions and 3 deletions

View file

@ -33,7 +33,9 @@ class StatusMessage < Post
after_create :queue_gather_oembed_data, :if => :contains_oembed_url_in_text?
#scopes
scope :where_person_is_mentioned, lambda{|person| joins(:mentions).where(:mentions => {:person_id => person.id})}
scope :where_person_is_mentioned, lambda do |person|
joins(:mentions).where(:mentions => {:person_id => person.id})
end
def self.user_tag_stream(user, tag_ids)
owned_or_visible_by_user(user).

View file

@ -30,7 +30,7 @@ module Diaspora
#cache.ensure_populated!(opts)
name = klass.to_s.downcase
shareable_ids = cache.send(name+"_ids", opts[:max_time], opts[:limit])
shareable_ids = cache.send(name+"_ids", opts[:max_time], opts[:limit] +1)
end
if perform_db_query?(shareable_ids, cache, opts)

View file

@ -25,7 +25,7 @@ class Stream::Multi < Stream::Base
# @return [Boolean]
def ajax_stream?
false
false
end
#emits an enum of the groups which the post appeared