diff options
author | Joe Orton <jorton@apache.org> | 2008-04-08 15:47:48 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2008-04-08 15:47:48 +0000 |
commit | 2e2731f3f9ec93ee7b7863d8983cb5193900157f (patch) | |
tree | 16067f77df9d472b3d6670b5fbb2a344dbb47c23 /modules/ssl | |
parent | ed2ab3d8e6fd7b87424ff8afc2eeeaa382511d6c (diff) | |
download | httpd-2e2731f3f9ec93ee7b7863d8983cb5193900157f.tar.gz |
Adjust socache init interface to take sizing hints, and namespace tag
for memcache:
* modules/cache/ap_socache.h (struct ap_socache_hints): New structure.
Change init callback to take namespace string and hints structure pointer.
* modules/cache/mod_socache_dc.c (socache_dc_init): Adjust accordingly.
* modules/cache/mod_socache_dbm.c (struct ap_socache_instance_t): Rename
timeout field to expiry_interval.
(socache_dbm_init, socache_dbm_create): Take expiry interval from
hints rather than hard-code to 30.
(socache_dbm_expire): Update for timeout field rename.
* modules/cache/mod_socache_shmcb.c (socache_shmcb_init): Adjust for
hints and namespace; adjust subcache index sizing heuristics to use
passed-in hints.
* modules/cache/mod_socache_memcache.c (struct ap_socache_instance_t):
Add tag, taglen fields.
(socache_mc_init): Store the passed-in namespace in instance
structure.
(mc_session_id2sz): Adjust to not take context, use configured
tag as string prefix, and not use a return value.
(socache_mc_store, socache_mc_retrieve, socache_mc_remove):
Adjust for mc_session_id2sz interface changes.
* modules/ssl/ssl_scache.c (ssl_scache_init): Pass namespace and hints
to socache provider init function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645978 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl')
-rw-r--r-- | modules/ssl/ssl_scache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c index 585958ea1e..83e40053ac 100644 --- a/modules/ssl/ssl_scache.c +++ b/modules/ssl/ssl_scache.c @@ -43,6 +43,7 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p) apr_status_t rv; void *data; const char *userdata_key = "ssl_scache_init"; + struct ap_socache_hints hints; /* The very first invocation of this function will be the * post_config invocation during server startup; do nothing for @@ -67,7 +68,12 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p) return; } - rv = mc->sesscache->init(mc->sesscache_context, s, p); + memset(&hints, 0, sizeof hints); + hints.avg_obj_size = 150; + hints.avg_id_len = 30; + hints.expiry_interval = 30; + + rv = mc->sesscache->init(mc->sesscache_context, "mod_ssl", &hints, s, p); if (rv) { /* ABORT ABORT etc. */ ssl_die(); |