comparison app/models/tweet.rb @ 30:205c0b5d9f44

Whoops, expires_in accidentally as key name.
author edogawaconan <me@myconan.net>
date Thu, 18 Sep 2014 09:29:07 +0900
parents 03f904c070f7
children e5082c4c234d
comparison
equal deleted inserted replaced
29:cf5c379d133f 30:205c0b5d9f44
6 :access_token_secret => ENV["RT_ACCESS_TOKEN_SECRET"] 6 :access_token_secret => ENV["RT_ACCESS_TOKEN_SECRET"]
7 } 7 }
8 8
9 def timeline 9 def timeline
10 @timeline ||= 10 @timeline ||=
11 Rails.cache.fetch :timeline => @twitter_id, :expires_in => 5.minutes do 11 Rails.cache.fetch({ :timeline => @twitter_id }, :expires_in => 5.minutes) do
12 @client.user_timeline(@twitter_id) 12 @client.user_timeline(@twitter_id)
13 end 13 end
14 end 14 end
15 15
16 def initialize(twitter_id) 16 def initialize(twitter_id)