By the way, where can I found a description of memcached deletion algorythm? <br>What elements are deleted and in what order? <br><br><div><span class="gmail_quote">On 3/20/07, <b class="gmail_sendername">Steven Grimm</b> <
<a href="mailto:sgrimm@facebook.com">sgrimm@facebook.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What's the problem you're trying to solve? You want to see why cache
<br>entries are vanishing, I imagine? If so, then you're right, just logging<br>it will be easiest, especially if you have multiple clients. The server<br>doesn't do that out of the box, but it'd be pretty easy to hack in. I
<br>think the following would do it (output will only happen if you run the<br>server with "-vv"):<br><br>--- a/src/items.c<br>+++ b/src/items.c<br>@@ -100,6 +100,8 @@ item *do_item_alloc(char *key, size_t nkey, int
<br>flags, rel_time_t expti<br><br> for (search = tails[id]; tries>0 && search; tries--,<br>search=search->prev) {<br> if (search->refcount==0) {<br>+ if (settings.verbose
> 1)<br>+ printf("evicting item %s\n", ITEM_key(search));<br> do_item_unlink(search);<br> break;<br> }<br><br>That's against the MT version of the code but should apply to the
<br>vanilla 1.2.x code too (maybe even 1.1.x).<br><br>-Steve<br><br><br>Cristian Rusu wrote:<br>> Hello<br>><br>> Is there any way to make the server call a specified client API<br>> function on object deletion when that happens in order to release
<br>> resources for new objects? It will be useful at least for debug purposes?<br>><br>> Something I can set as a callback just before using add or set<br>> API...to return all keys deleted.<br>> Or to set a dump file if not....
<br>><br>><br>> --<br>> Sincerely<br>> Cristian Rusu<br>> Web Programmer & Electronic publisher<br><br></blockquote></div><br>