mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
* modules/cache/mod_socache_memcache.c (socache_mc_store): Pass
through expiration time. Submitted by: Faidon Liambotis <paravoid debian.org>, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1649491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.5.0
|
Changes with Apache 2.5.0
|
||||||
|
|
||||||
|
*) mod_socache_memcache: Pass expiration time through to memcached.
|
||||||
|
[Faidon Liambotis <paravoid debian.org>, Joe Orton]
|
||||||
|
|
||||||
*) split-logfile: Fix perl error: 'Can't use string ("example.org:80")
|
*) split-logfile: Fix perl error: 'Can't use string ("example.org:80")
|
||||||
as a symbol ref while "strict refs"'. PR 56329.
|
as a symbol ref while "strict refs"'. PR 56329.
|
||||||
[Holger Mauermann <mauermann gmail.com>]
|
[Holger Mauermann <mauermann gmail.com>]
|
||||||
|
10
modules/cache/mod_socache_memcache.c
vendored
10
modules/cache/mod_socache_memcache.c
vendored
@ -205,8 +205,14 @@ static apr_status_t socache_mc_store(ap_socache_instance_t *ctx, server_rec *s,
|
|||||||
return APR_EINVAL;
|
return APR_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In APR-util - unclear what 'timeout' is, as it was not implemented */
|
/* memcache needs time in seconds till expiry; fail if this is not
|
||||||
rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData, 0, 0);
|
* positive *before* casting to unsigned (apr_uint32_t). */
|
||||||
|
expiry -= apr_time_now();
|
||||||
|
if (apr_time_sec(expiry) <= 0) {
|
||||||
|
return APR_EINVAL;
|
||||||
|
}
|
||||||
|
rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData,
|
||||||
|
apr_time_sec(expiry), 0);
|
||||||
|
|
||||||
if (rv != APR_SUCCESS) {
|
if (rv != APR_SUCCESS) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00790)
|
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00790)
|
||||||
|
Reference in New Issue
Block a user