(see also http://apache-http-server.18135.x6.nabble.com/PATCH-mod-socache-memcache-don-t-ignore-expiry-td5007649.html) socache_memcache ignores shared object expiry settings, creating keys which are never cleared from the memcache daemon. there is a one-line patch and further discussion at the above URL, reposted for convenience: --- modules/cache/mod_socache_memcache.c (revision 1510425) +++ modules/cache/mod_socache_memcache.c (working copy) @@ -205,9 +205,10 @@ return APR_EINVAL; } - /* In APR-util - unclear what 'timeout' is, as it was not implemented */ - rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData, 0, 0); + rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData, + apr_time_sec(expiry), 0); + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00790) "scache_mc: error setting key '%s' " I have tested this patch myself and it does indeed cause the correct values to be sent to the server.
That was me, thanks for forwarding the patch. I'm adding myself to Cc, in case there are any questions.
I realize this post is quite old, but I ran into this same bug today and it looks from everything I see like this patch was never taken to correct it? Perhaps I'm missing something, but this module is not as useable as it could be without the patch provided, since cache entries cannot be expired? Should this patch be merged or is there some other fix available?
someone just needs to commit the thing - I have no idea how things get done here in the apache project... I just added the patch that someone else already did for this little bug. FWIW I am also very keen on seeing this fixed myself, but I sure as hell can't commit it.
Strange, I'm going to tweak some things in the bug just to see if it'll get someone's attention. Hopefully we can at least get a pointer on how to get this committed...
fixed in trunk http://svn.apache.org/r1649491
Backported in r1772331 and part of version 2.4.24