Permalink
Browse files

bugfix: query ttl wasn't being set (defaulted to 10 minutes)

  • Loading branch information...
1 parent 4825bd6 commit d61b8fccb86ccf240721a1a5499ffe996945334a @slact committed Jan 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/queris/query.rb
View
@@ -16,7 +16,7 @@ def initialize(model, arg=nil, &block)
@redis_prefix = (arg[:prefix] || arg[:redis_prefix] || model.redis_prefix) + self.class.name + ":"
@redis=arg[:redis] || Queris.query_redis
@subquery = []
- @ttl ||= 600 #10 minutes default expire
+ @ttl= arg[:ttl] || 600 #10 minutes default expire
@created_at = Time.now.utc
if expire = (arg[:expire_at] || arg[:expire] || arg[:expire_after])
raise "Can't create query with expire_at option and check_staleness options at once" if arg[:check_staleness]

0 comments on commit d61b8fc

Please sign in to comment.