diff options
author | Joe Orton <jorton@apache.org> | 2008-12-09 14:11:45 +0100 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2008-12-09 14:11:45 +0100 |
commit | dce91079c126cffc7807b2fcf0a8a013e5e79a3a (patch) | |
tree | 489712a1d97564d346740ea0fee46ca40682380d /include/ap_socache.h | |
parent | Increment version.ent. We are at 2.3.1-dev. (diff) | |
download | apache2-dce91079c126cffc7807b2fcf0a8a013e5e79a3a.tar.xz apache2-dce91079c126cffc7807b2fcf0a8a013e5e79a3a.zip |
Reduce config overhead for use of socache interface by allowing
default paths to be used if none are configured:
* include/ap_socache.h (ap_socache_provider_t::create):
Allow arg to be NULL to force use of defaults.
(ap_socache_provider_t::init): Rename 'namespace' parameter to
'cname' and restrict to allow use in filesystem paths.
* modules/cache/mod_socache_dbm.c (socache_dbm_create,
socache_dbm_init),
modules/cache/mod_socache_shmcb.c (socache_shmcb_create,
socache_shmcb_init):
Default to use of runtimedir-relative paths if no
explicit path is configured.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724682 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_socache.h')
-rw-r--r-- | include/ap_socache.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/ap_socache.h b/include/ap_socache.h index 1f1befb1a7..b037c0a6ee 100644 --- a/include/ap_socache.h +++ b/include/ap_socache.h @@ -67,7 +67,8 @@ typedef struct ap_socache_provider_t { * passed as the first argument to subsequent invocations. * * @param instance Output parameter to which instance object is written. - * @param arg Used-specified configuration string + * @param arg Used-specified configuration string. May be NULL to + * force use of defaults. * @param tmp Pool to be used for any temporary allocations * @param p Pool to be use for any allocations lasting as long as * the created instance @@ -76,18 +77,22 @@ typedef struct ap_socache_provider_t { const char *(*create)(ap_socache_instance_t **instance, const char *arg, apr_pool_t *tmp, apr_pool_t *p); - /* Initialize the cache. NAMESPACE must given a unique string - * prefix for use with memcached; if hints is non-NULL, it gives a - * set of hints for the provider. Return APR error code. - + /* Initialize the cache. The cname must be of maximum length 16 + * characters, and uniquely identifies the consumer of the cache + * within the server; using the module name is recommended, e.g. + * "mod_ssl-sess". This string may be used within a filesystem + * path so use of only alphanumeric [a-z0-9_-] characters is + * recommended. If hints is non-NULL, it gives a set of hints for + * the provider. Return APR error code. + * * @param instance The cache instance - * @param namespace A unique string identifying the consumer of this API + * @param cname A unique string identifying the consumer of this API * @param hints Optional hints argument describing expected cache use * @param s Server structure to which the cache is associated * @param pool Pool for long-lived allocations * @return APR status value indicating success. */ - apr_status_t (*init)(ap_socache_instance_t *instance, const char *namespace, + apr_status_t (*init)(ap_socache_instance_t *instance, const char *cname, const struct ap_socache_hints *hints, server_rec *s, apr_pool_t *pool); |