lib/picky/backends/redis.rb in picky-3.6.8 vs lib/picky/backends/redis.rb in picky-3.6.9
- old
+ new
@@ -99,9 +99,14 @@
#
# TODO What if it hasn't been dumped?
# Move this method to the actual backends?
#
def ids combinations, amount, offset
+ # TODO FIXME This is actually not correct:
+ # A dumped/loaded Redis backend should use
+ # the Redis backend calculation method.
+ # So loaded? would be more appropriate.
+ #
if immediate
# Just checked once on the first call.
#
if redis_with_scripting?
@@script = "local intersected = redis.call('zinterstore', ARGV[1], #(KEYS), unpack(KEYS)); if intersected == 0 then redis.call('del', ARGV[1]); return {}; end local results = redis.call('zrange', ARGV[1], tonumber(ARGV[2]), tonumber(ARGV[3])); redis.call('del', ARGV[1]); return results;"
\ No newline at end of file