ADT features in memcached?

howard chen howachen at
Wed May 30 16:39:06 UTC 2007

I know memcached don't have this featre right now, but i think it is

e.g. (PHP) - List

$arr = array (1,2,3);

memcache_obj->set($key, $arr);

memcache_obj->push($key, $arr, 4);
memcache_obj->push($key, $arr, 5);
memcache_obj->pop($key, $arr);

print_r(memcache_obj->get($key, $arr)); // return 1,2,3,4

using similar way, we can also think abt implement queue, stack,
btree, heap, etc

you might ask: why implement those things?

in example situation: sometimes we need to retrieve the whole array
from memcached, append it using PHP, and save it back to memcachd. if
we have push() method, we can save a lot of I/O

any comments?

More information about the memcached mailing list