httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: aprmemcache question
Date Thu, 27 Sep 2012 15:20:12 GMT
On Thu, Sep 27, 2012 at 10:58 AM, Ben Noordhuis <> wrote:
> On Thu, Sep 27, 2012 at 4:29 PM, Joshua Marantz <> wrote:
>> Thanks Ben,
>> That might be an interesting hack to try, although I wonder whether some of
>> our friends running mod_pagespeed on FreeBSD might run into trouble with
>> it.  I did confirm that my prefork build has APR built with
>> APR_HAS_THREADS, which for some reason I had earlier thought was not the
>> case.
> It should work, provided you linked against libapr. The FreeBSD man
> page says this:
>   If dlsym() is called with the special handle NULL, it is interpreted as a
>   reference to the executable or shared object from which the call is being
>   made.  Thus a shared object can reference its own symbols.
> And that's how it works on Linux, Solaris, NetBSD and probably OpenBSD as well.
>> Do you have a feel for the exact meaning of that TTL parameter to
>> apr_memcache_server_create?
> You mean what units it uses? Microseconds (at least, in 2.4).

Right.  I screwed up on changing that yesterday.  The APR doc was
already fixed long ago to indicate it was microseconds instead of
seconds, the Subversion code hasn't been fixed to respect that, and
the bug that was opened to fix the code to use seconds put me in the
wrong frame of mind :(

What does ttl mean for this particular API?

All resources in the resource list are cleaned up when the memcache
server is deleted/pool is cleared/destroyed.

Individual resources are returned to the list at the end of individual
memcache operations.  When a resource is returned to the list, "old"
resources are destroyed, where "old" is determined by the ttl.
Destroying a memcache resource means it sends the "quit" message to
memcached and closes the socket.  So ttl sets a limit on how long a
particular connection to memcached can be used.

Born in Roswell... married an alien...

View raw message