QnaList > Groups > Redis-Db > Nov 2009
faq

Issue 93 In Redis: Remove List When It's Empty

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 93 by libc.mail: Remove list when it's empty
http://code.google.com/p/redis/issues/detail?id=93
Ruby code:
� �redis = Redis.new
� �1_000_000.times do |i|
� � � �redis.push_tail(i, i)
� � � �redis.pop_head(i)
� � end
Result:
� � DB 0: 1000000 keys (0 volatile) in 1048576 slots HT.
All of them are empty lists. It would be nice if there would be a command �
like remove_if_empty
or pop_tail/head_and_remove_if_empty.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

asked Nov 9 2009 at 08:26

re...googlecode.com's gravatar image



Related discussions

Tagged

Group Redis-db

asked Nov 9 2009 at 08:26

active Nov 9 2009 at 08:26

posts:1

users:1

Redis-db

©2013 QnaList.com . QnaList is part of ZisaTechnologies LLC.