summaryrefslogtreecommitdiffstats
path: root/modules/cache/mod_cache.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2012-11-09 09:44:08 +0100
committerJeff Trawick <trawick@apache.org>2012-11-09 09:44:08 +0100
commit85ec79e3ced9795177ccba200bb56a0e781ffd17 (patch)
tree355f3c14422a8f29c1b7d8d862c8a9f4686072e9 /modules/cache/mod_cache.c
parent *) mod_xml2enc: Fix problems with charset conversion altering the (diff)
downloadapache2-85ec79e3ced9795177ccba200bb56a0e781ffd17.tar.xz
apache2-85ec79e3ced9795177ccba200bb56a0e781ffd17.zip
The following now respects DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR:
- mod_cache: thundering herd lock directory git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache/mod_cache.c')
-rw-r--r--modules/cache/mod_cache.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c
index c5c4d3b1fe..c106aedba1 100644
--- a/modules/cache/mod_cache.c
+++ b/modules/cache/mod_cache.c
@@ -1801,7 +1801,6 @@ static void *merge_dir_config(apr_pool_t *p, void *basev, void *addv) {
static void * create_cache_config(apr_pool_t *p, server_rec *s)
{
- const char *tmppath;
cache_server_conf *ps = apr_pcalloc(p, sizeof(cache_server_conf));
/* array of URL prefixes for which caching is enabled */
@@ -1824,10 +1823,7 @@ static void * create_cache_config(apr_pool_t *p, server_rec *s)
ps->ignore_session_id_set = CACHE_IGNORE_SESSION_ID_UNSET;
ps->lock = 0; /* thundering herd lock defaults to off */
ps->lock_set = 0;
- apr_temp_dir_get(&tmppath, p);
- if (tmppath) {
- ps->lockpath = apr_pstrcat(p, tmppath, DEFAULT_CACHE_LOCKPATH, NULL);
- }
+ ps->lockpath = ap_runtime_dir_relative(p, DEFAULT_CACHE_LOCKPATH);
ps->lockmaxage = apr_time_from_sec(DEFAULT_CACHE_MAXAGE);
ps->x_cache = DEFAULT_X_CACHE;
ps->x_cache_detail = DEFAULT_X_CACHE_DETAIL;
@@ -2202,7 +2198,7 @@ static const char *set_cache_lock_path(cmd_parms *parms, void *dummy,
(cache_server_conf *)ap_get_module_config(parms->server->module_config,
&cache_module);
- conf->lockpath = ap_server_root_relative(parms->pool, arg);
+ conf->lockpath = ap_runtime_dir_relative(parms->pool, arg);
if (!conf->lockpath) {
return apr_pstrcat(parms->pool, "Invalid CacheLockPath path ",
arg, NULL);
@@ -2380,8 +2376,8 @@ static const command_rec cache_cmds[] =
"Enable or disable the thundering herd lock."),
AP_INIT_TAKE1("CacheLockPath", set_cache_lock_path, NULL, RSRC_CONF,
"The thundering herd lock path. Defaults to the '"
- DEFAULT_CACHE_LOCKPATH "' directory in the system "
- "temp directory."),
+ DEFAULT_CACHE_LOCKPATH "' directory relative to the "
+ "DefaultRuntimeDir setting."),
AP_INIT_TAKE1("CacheLockMaxAge", set_cache_lock_maxage, NULL, RSRC_CONF,
"Maximum age of any thundering herd lock."),
AP_INIT_FLAG("CacheHeader", set_cache_x_cache, NULL, RSRC_CONF | ACCESS_CONF,