Extensible command syntax

Dustin Sallings dustin at spy.net
Mon Nov 12 19:12:57 UTC 2007

On Nov 12, 2007, at 6:15 , Peter J. Holzer wrote:

>> 	Ah, well in the general case, there's no processing to do for not
>> found keys.
> I don't think that's true. If the key hasn't been found in memcached  
> you
> often need to look in the database (or whatever it is you are  
> caching).

	I was referring to the client work.  It's implied that a cache miss  
means that you need to go look somewhere else.

> If you know of the cache misses earlier you can fire off the first
> database requests while you are still receiving cache hits from
> memcached. But I think this is possible with normal get requests, no
> change to multiget required.

	You *can* do that, but I'd expect it to be significantly slower and  
more resource intensive than getting the cache results and doing a  
single lookup against your source with all of the missing keys.

	Of course, one could contrive a pathological case, but I imagine it'd  
take quite fancy code to be faster at incrementally handling multiple  
source queries while processing memcached results and still be faster  
at rendering its final result than doing it in two steps.

Dustin Sallings

More information about the memcached mailing list