Tag Function
Du Song
freewizard at gmail.com
Mon Feb 25 08:03:57 UTC 2008
On Wed, Feb 13, 2008 at 11:15 AM, Robert Q. Liu <robertqingliu at gmail.com> wrote:
>
>
>
>
> Hi, all:
>
>
>
> We add "Tag Function" for memcached. Propose is remove several keys with
> the same tag in one operation. We use hash and splay tree, make the
> "tag_add" and "tag_delete" commands very quickly, and save memory as much as
> possible.
>
>
>
> New memcached command:
>
> tag_add <tag> <key>*
>
> tag_delete <tag>
>
>
>
> More detail:
>
> http://code.google.com/p/memcached-tag/
>
>
>
> If you find BUGS, please tell us, thanks very much.
>
>
>
> Have Fun!
>
> Robert Q. Liu
>
What about tweak the code a bit to match the community proposal[1]
about tag function last year? for Liu's code, that is
1. changing from
tag_add tag key1 key2 ...
to
add_tag key tag1 tag2 ...
which may be more common in daily usage,
2. renaming from
tag_delete
to
invalidate_tag
which prevents misunderstanding.
I wonder if changes above will help adding this as an experimental
feature in the future release since (i guess) lots of ppl (incl. me)
demand this tag thing so much. :P
[1] http://lists.danga.com/pipermail/memcached/2007-October/005436.html
--
Regards,
Du Song
More information about the memcached
mailing list