答复: Tag Function

Robert Q. Liu robertqingliu at gmail.com
Thu Feb 14 01:04:40 UTC 2008


Hi,

One tag can be set for one or more keys, and one key can have one or more tags.

For example: 
    $memcache->tag_add("tag_1", array("key1", "key2", "key3", "key4"));
    $memcache->tag_add("tag_2", "key1");

tag_1 and tag_2 both have key1.
set tag_1 to key1, key2, key3, key4 at once.

Welcome discussion. Thank you!

-----邮件原件-----
发件人: NTPT [mailto:NTPT at seznam.cz] 
发送时间: 2008年2月13日 20:27
收件人: Dustin Sallings
抄送: Robert Q. Liu; memcached at lists.danga.com
主题: Re: Tag Function

can some key have multiple tags ? 
can I set tag for more than one key at once ? 

It looks promising,  I will made afuture investigations, but it seems to cover  my needs. for simple  multidimensional storage and droping row or column....  


>  ------------ Původní zpráva ------------
>  Od: Dustin Sallings <dustin at spy.net>
>  Předmět: Re: Tag Function
>  Datum: 13.2.2008 04:35:07
>  ----------------------------------------
>  
>     I'm sure we all appreciate the effort, but I don't think it was  
>  necessary to create a formal fork of the project to do so.
>  
>     Is there something about your implementation that you feel makes it  
>  unsuitable to be merged into the main project?
>  
>  -- 
>  Dustin Sallings (mobile)
>  
>  On Feb 12, 2008, at 19:15, "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
>  >
>  >
>  >
>  
>  
>  



More information about the memcached mailing list