Permalink
Browse files

Merge pull request #33 from jgadbois/master

Fix for #32
  • Loading branch information...
erwaller committed May 24, 2013
2 parents 249f802 + 3581251 commit fab3e4ac84268d2e7b2c80677bc29e7561ea4119
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/soulmate/matcher.rb
View
@@ -13,7 +13,7 @@ def matches_for_term(term, options = {})
cachekey = "#{cachebase}:" + words.join('|')
- if !options[:cache] || !Soulmate.redis.exists(cachekey)
+ if !options[:cache] || !Soulmate.redis.exists(cachekey) || Soulmate.redis.exists(cachekey) == 0
interkeys = words.map { |w| "#{base}:#{w}" }
Soulmate.redis.zinterstore(cachekey, interkeys)
Soulmate.redis.expire(cachekey, 10 * 60) # expire after 10 minutes

0 comments on commit fab3e4a

Please sign in to comment.