Memcached - multiple puts and deletes?

Hi,

I have recently started using memcached to store my ‘Vehicle’ models
which are expensive to construct (have may related models). I am also
using memcache-client to fetch these models, sometimes many at a time
using ‘get_multi’.

In the docs
(http://dev.robotcoop.com/Libraries/memcache-client/index.html) there
doesn’t seem to be any support for multiple puts and deletes.

Are there any alternative memcached clients which support multiple puts
and deletes? Has anyone implemented support for this in their own
applications?

Any pointers or tips would be much appreciated.

Thanks,
GiantCranes

On 4/14/07, Giant C. [email protected] wrote:

I have recently started using memcached to store my ‘Vehicle’ models
which are expensive to construct (have may related models). I am also
using memcache-client to fetch these models, sometimes many at a time
using ‘get_multi’.

In the docs
(http://dev.robotcoop.com/Libraries/memcache-client/index.html) there
doesn’t seem to be any support for multiple puts and deletes.

memcached’s protocol does not support multi-key put or delete.

Are there any alternative memcached clients which support multiple puts
and deletes? Has anyone implemented support for this in their own
applications?

If any client supports multi-key put or delete, it’ll be implemented
at the app layer.

Like this:

def delete_multi(*keys)
keys.each { |key| delete key }
end

The multi get is implemented in memcached itself.


Chris W.

memcached’s protocol does not support multi-key put or delete.

Are there any alternative memcached clients which support multiple puts
and deletes? Has anyone implemented support for this in their own
applications?

If any client supports multi-key put or delete, it’ll be implemented
at the app layer.

Like this:

def delete_multi(*keys)
keys.each { |key| delete key }
end

The multi get is implemented in memcached itself.

Thanks for the info, I suppose I will have to do the deletes in a
background thread.