Experimental patch - ring buffers

Dustin Sallings dustin at spy.net
Sun May 6 20:59:30 UTC 2007


On May 6, 2007, at 1:59, Nathan Schmidt wrote:

> Create a new ring
> ring <key> 0 <exp> <capacity>\r\n
>
> Push a value onto the ring
> push <key> 0 <ignored> <length>\r\n<value\r\n
>
> Get the empty-string-delimited concatenated values available on the  
> ring
> rget <key>\r\n

	This does look interesting.  It could be useful in general to know  
previous values stored for a given key.

	It seems like you could get away without creating the ``push'' and  
``rget'' commands.  If a ring buffer is defined for a given key,  
``add'' and ``get'' should suffice.  I don't think it'd be terribly  
confusing to client since they'd have to have created a ring buffer  
in the first place.

	I don't quite get the response as defined above.  What do you mean  
by ``empty-string-delimited concatenated values''?  I'd think a  
response that looked like a bulk get with the same key repeated, but  
with different values (and possibly different flags) would be ideal.   
Even for the same data type, my client will vary flags based on  
things like efficacy of compression.


	BTW, you guys know how to party.  :)

-- 
Dustin Sallings




More information about the memcached mailing list