Permalink
Browse files

Delete temp sets after use

Signed-off-by: David Celis <david@davidcelis.com>
  • Loading branch information...
David Celis
David Celis committed Oct 16, 2012
1 parent 43bfa3a commit b7202f4d96f63631fab928f60c6908b5e3ad538d
Showing with 3 additions and 1 deletion.
  1. +1 −1 Gemfile.lock
  2. +2 −0 lib/recommendable/helpers/calculations.rb
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- recommendable (2.0.0)
+ recommendable (2.0.0.20121011)
activesupport (>= 3.0.0)
hooks (>= 0.2.1)
redis (>= 2.2.0)
@@ -108,6 +108,8 @@ def update_recommendations_for(user_id)
scores.each do |s|
Recommendable.redis.zadd(recommended_set, s[0], s[1])
end
+
+ Recommendable.redis.del(temp_set)
end
true

0 comments on commit b7202f4

Please sign in to comment.