diff options
author | Paul Querna <pquerna@apache.org> | 2007-06-08 04:48:04 +0200 |
---|---|---|
committer | Paul Querna <pquerna@apache.org> | 2007-06-08 04:48:04 +0200 |
commit | 1b7a5c2566d592450055fbb4cdbf26e081178d1c (patch) | |
tree | 0c11eff4c5c0f5313778a6334de08f34e2ec4b83 /modules/ssl/ssl_scache.c | |
parent | * Preset the form fields for route and redirect with the values of the active (diff) | |
download | apache2-1b7a5c2566d592450055fbb4cdbf26e081178d1c.tar.xz apache2-1b7a5c2566d592450055fbb4cdbf26e081178d1c.zip |
Add support for distributed caching of SSL Sessions inside memcached, using apr_memcache, which is present in APR-Util 1.3/trunk.
This was originally written at ApacheCon US 2005 (San Diego), and was sent to the list:
http://mail-archives.apache.org/mod_mbox/httpd-dev/200512.mbox/%3C439C6C07.9030904@force-elite.com%3E
This version is slightly cleaned up, and of course, uses the now bundled apr_memcache, rather than an external dependency.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@545379 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_scache.c')
-rw-r--r-- | modules/ssl/ssl_scache.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c index c85e4f19cc..e01e1d1bed 100644 --- a/modules/ssl/ssl_scache.c +++ b/modules/ssl/ssl_scache.c @@ -59,6 +59,10 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p) else if (mc->nSessionCacheMode == SSL_SCMODE_DC) ssl_scache_dc_init(s, p); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (mc->nSessionCacheMode == SSL_SCMODE_MC) + ssl_scache_mc_init(s, p); +#endif else if (mc->nSessionCacheMode == SSL_SCMODE_SHMCB) { void *data; const char *userdata_key = "ssl_scache_init"; @@ -85,6 +89,10 @@ void ssl_scache_kill(server_rec *s) else if (mc->nSessionCacheMode == SSL_SCMODE_DC) ssl_scache_dc_kill(s); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (mc->nSessionCacheMode == SSL_SCMODE_MC) + ssl_scache_mc_kill(s); +#endif return; } @@ -101,6 +109,10 @@ BOOL ssl_scache_store(server_rec *s, UCHAR *id, int idlen, time_t expiry, SSL_SE else if (mc->nSessionCacheMode == SSL_SCMODE_DC) rv = ssl_scache_dc_store(s, id, idlen, expiry, sess); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (mc->nSessionCacheMode == SSL_SCMODE_MC) + rv = ssl_scache_mc_store(s, id, idlen, expiry, sess); +#endif return rv; } @@ -117,6 +129,10 @@ SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen) else if (mc->nSessionCacheMode == SSL_SCMODE_DC) sess = ssl_scache_dc_retrieve(s, id, idlen); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (mc->nSessionCacheMode == SSL_SCMODE_MC) + sess = ssl_scache_mc_retrieve(s, id, idlen); +#endif return sess; } @@ -132,6 +148,10 @@ void ssl_scache_remove(server_rec *s, UCHAR *id, int idlen) else if (mc->nSessionCacheMode == SSL_SCMODE_DC) ssl_scache_dc_remove(s, id, idlen); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (mc->nSessionCacheMode == SSL_SCMODE_MC) + ssl_scache_mc_remove(s, id, idlen); +#endif return; } @@ -162,6 +182,10 @@ static int ssl_ext_status_hook(request_rec *r, int flags) else if (sc->mc->nSessionCacheMode == SSL_SCMODE_DC) ssl_scache_dc_status(r, flags, r->pool); #endif +#ifdef HAVE_SSL_CACHE_MEMCACHE + else if (sc->mc->nSessionCacheMode == SSL_SCMODE_MC) + ssl_scache_mc_status(r, flags, r->pool); +#endif ap_rputs("</td></tr>\n", r); ap_rputs("</table>\n", r); |