<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Oct 4, 2007, at 1:07, BUSTARRET, Jean-francois wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV dir="ltr" align="left"><SPAN class="863311107-04102007"><FONT face="Arial" color="#0000ff" size="2"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 255); font-family: Arial; font-size: 10px; text-align: -khtml-left; ">It would be nice to be able to add multiple tags with a single commands : add_tag(key, tag1, tag2, ..., tagN), to avoid multiple roudtrips, or add a tag list as an optionnal parameter to the set/add/replace commands. ie : set &lt;key&gt; &lt;flags&gt; &lt;exptime&gt; &lt;bytes&gt; &lt;tag1&gt;,&lt;tag2&gt;,&lt;tag3&gt;...\r\n</SPAN></FONT></SPAN></DIV></SPAN></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>I don't think there's a problem with multi-tag.  I'd expect people would want to have more than one anyway.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Adding tags to all of the existing commands is a tough one, though.  The cost of one more round trip is trivial compared to having to change the server processing of mutation commands and updating all of the client APIs to be able to handle this.  In a particular client, you can still send both commands as a single stream and then just expect two lines of response.</DIV><BR><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV dir="ltr" align="left"><SPAN class="863311107-04102007"><FONT face="Arial" color="#0000ff" size="2"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 255); font-family: Arial; font-size: 10px; text-align: -khtml-left; ">AFAIAC, I think tags need to be released. My use for tags would be to tag cache entries by content id/user id/channel id. Having to store every id used (even deleted content/content not accessed for a long time) since the last start of memcached would be a problem...</SPAN></FONT></SPAN></DIV></SPAN></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>OK, it's worth considering, then.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Each tag will have a reference count that is increment every time the tag is successfully added to an item (i.e. must not increment if an item lookup fails or the item already has the tag).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>When the item is deallocated, all tags should be decremented for that item.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>When the tags reference count hits zero, we'll pull it from the global map.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Memory churn may be an issue.  Someone who knows allocators better than I do can decide what to do here.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV>Dustin Sallings</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>