Recursive lookups ?

Christopher Schmidt crschmidt at crschmidt.net
Wed Feb 21 15:10:19 UTC 2007


On Wed, Feb 21, 2007 at 01:26:37PM +0100, NTPT wrote:
> It is useful for simulating a multidimensional arrays for example or for  caching a pointers to data.

I think that (in my experience) data like this is simply serialized and
stored into memcached as a single object. It's possible that there is
some use case where this isn't optimal, but I think this is how most of
the memcached clients behave: simply

   cache.set("key",my_complex_value)
   my_complex_value = cache.get("key")

and when you retrieve it, you should get back the full object as it was
when you saved it.

Of course, this depends on whether the object you're saving is
serializable by your language... but I don't think that a multi-get as
you described solved that problem either.

Regards,
-- 
Christopher Schmidt
Web Developer


More information about the memcached mailing list