Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

发现批量删除是个问题?

139 views
Skip to first unread message

phpcleps

unread,
Oct 30, 2011, 10:37:13 PM10/30/11
to BeanDB
Hi,Davies Liu,你好!
我们存储在BeansDB里的小图片,都是动态生成的缩略图,Key采用年月日+文件名的方式,会每隔三个月左右,批量删除一次。目前我们想
到的方案是,采用数据库来保存Key,到时遍历数据库再批量删除。
不知BeansDB在这方面,是否有好的解决方案?
非常期待你的回复,非常感谢!

Davies Liu

unread,
Oct 31, 2011, 12:59:25 AM10/31/11
to bea...@googlegroups.com
beansdb 可以通过遍历 htree 的方式来遍历,比如 get @ 然后再 get @0 ....

遍历到需要删除的内容后,可以用delete xxx,
最后可以用 flush_all 0 命令(用telnet 或者nc来手动发送)来回收磁盘空间。

2011/10/31 phpcleps <lifew...@addcn.com>:

--
- Davies

phpcleps

unread,
Oct 31, 2011, 1:52:16 AM10/31/11
to BeanDB
原来是这样,谢谢Davies Liu. ^-^

On 10月31日, 下午12时59分, Davies Liu <davies....@gmail.com> wrote:
> beansdb 可以通过遍历 htree 的方式来遍历,比如 get @ 然后再 get @0 ....
>
> 遍历到需要删除的内容后,可以用delete xxx,
> 最后可以用 flush_all 0 命令(用telnet 或者nc来手动发送)来回收磁盘空间。
>

> 2011/10/31 phpcleps <lifewea...@addcn.com>:

Reply all
Reply to author
Forward
0 new messages