https://issues.apache.org/bugzilla/show_bug.cgi?id=55445
Bug ID: 55445
Summary: mod_socache_memcache ignores expiry, creating eternal
memcache entries
Product: Apache httpd-2
Version: 2.4.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_socache_(dbm|dc|memcache|shmcb)
Assignee: [email protected]
Reporter: [email protected]
(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.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]