Hackathon / Multidimensional keys / Wildcard deletes

Paul Querna chip at corelands.com
Sun Jul 8 03:31:50 UTC 2007


Dustin Sallings wrote:
> 
>     There'd be indexing overhead, but you could have an O(1)
> invalidation if the tags themselves were versioned.
> 
>     Assuming the cache time is short or you're accessing these records,
> cleanup should pretty much take care of itself.
> 
>     Protocol-wise, would it make sense to have the tags be additional
> tokens on the mutation line?  i.e.:
> 
>     <command name> <key> <flags> <exptime> <bytes> [<tag> [...]]\r\n


Well, it does bring up a wider issue of protocol versioning....

I was thinking about a more generic structure, if we ever did a protocol
revamp, something like:

<command>\n
<meta>=<string||int>\n
data=<data>\m
END

So, for example a SET today would be like:
SET
key=foobar
flags=400
bytes=1000
data=...data...


Or something down that kind of path... This would make adding tags an
easy thing, and something that clients and servers could more easily
version safely for all commands....

-Paul



More information about the memcached mailing list