We've been kicking around the idea of ring buffers in memcached for a week or two. The premise is that something like an RSS feed is composed of some ordered list of n most recent items. Assembling this via incr / multi_get wasn't providing the kind of interface we wanted, and it's pretty easy to come up with some really interesting use cases for memcache-style 'results are correct if they're not undef' using a few new base commands.
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 These patches are basically a rough draft which pass my .t tests on daemon and client side -- would love to hear feedback about the operators and use cases other folks on the list can come up with. (This was written at a Cinco De Mayo party http://superhappydevhouse.org/SuperHappyDevHouse17, which may explain the rough edges.) Have fun, -Nathan / PBwiki
memcached-1.2.1-rbuf.patch
Description: Binary data
Cache-Memcached-1.14-rbuf.patch
Description: Binary data
