list delete

8 views
Skip to first unread message

ben

unread,
Oct 23, 2009, 9:33:36 AM10/23/09
to LightCloud
Just trying lighcloud & tokyo cabinet.
I've found that Lightcloud isn't deleting a list, list_remove seems to
go ok. Is this right?

>>> lightcloud.list_get('test_list')
['1', '2', '3', '1', '2', '3', '4', 'a']
>>> lightcloud.delete('test_list')
True
>>> lightcloud.list_get('test_list')
['1', '2', '3', '1', '2', '3', '4', 'a']

#try list_remove
>>>lightcloud.list_remove('test_list','2')
'ok'
>>> lightcloud.list_get('test_list')
['1', '3', '1', '3', '4', 'a']

#try delete again for luck
>>> lightcloud.delete('test_list')
True
>>> lightcloud.list_get('test_list')
['1', '3', '1', '3', '4', 'a']

#check regular value set/get/delete
>>> lightcloud.set('hello','world')
True
>>> lightcloud.get('hello')
'world'
>>> lightcloud.delete('hello')
True
>>> lightcloud.get('hello')
>>>

amix

unread,
Nov 12, 2009, 10:56:38 AM11/12/09
to LightCloud
Hi Ben

You should use lightcloud.list_varnish to delete a list.

List keys are prefixed (so they don't cause conflicts with other keys.

Kind regards,
Amir
Reply all
Reply to author
Forward
0 new messages