comparison app/models/tweet.rb @ 66:1161ad2a4390

Take care of rt removal from gem api Double the default count since filtering is done at gem level, not api.
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:34:12 +0900
parents 8983c426e256
children 37356e98b784
comparison
equal deleted inserted replaced
65:eecb35eac2f3 66:1161ad2a4390
1 class Tweet 1 class Tweet
2 def timeline 2 def timeline(options = {})
3 @timeline ||= 3 @timeline ||=
4 Rails.cache.fetch({ :timeline => @twitter_id }, :expires_in => 5.minutes) do 4 Rails.cache.fetch({ :timeline => @twitter_id, :options => options }, :expires_in => 5.minutes) do
5 @client.user_timeline(@twitter_id) 5 @client.user_timeline(@twitter_id, options)
6 end 6 end
7 end 7 end
8 8
9 def user 9 def user
10 @user ||= 10 @user ||=