From a4a9cfd65093f906f2f1bd4460a8c6f56d4e4f90 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 27 Jul 2015 21:16:57 +0900 Subject: [PATCH] nghttpx: Change session cache key prefix --- src/shrpx_ssl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shrpx_ssl.cc b/src/shrpx_ssl.cc index 937f6ccf..22625c7e 100644 --- a/src/shrpx_ssl.cc +++ b/src/shrpx_ssl.cc @@ -185,7 +185,8 @@ int ocsp_resp_cb(SSL *ssl, void *arg) { } } // namespace -constexpr char MEMCACHED_SESSION_ID_PREFIX[] = "nghttpx:session-id:"; +constexpr char MEMCACHED_SESSION_CACHE_KEY_PREFIX[] = + "nghttpx:tls-session-cache:"; namespace { int tls_session_new_cb(SSL *ssl, SSL_SESSION *session) { @@ -204,7 +205,7 @@ int tls_session_new_cb(SSL *ssl, SSL_SESSION *session) { auto req = make_unique(); req->op = MEMCACHED_OP_ADD; - req->key = MEMCACHED_SESSION_ID_PREFIX; + req->key = MEMCACHED_SESSION_CACHE_KEY_PREFIX; req->key += util::format_hex(id, idlen); auto sessionlen = i2d_SSL_SESSION(session, nullptr); @@ -261,7 +262,7 @@ SSL_SESSION *tls_session_get_cb(SSL *ssl, unsigned char *id, int idlen, auto req = make_unique(); req->op = MEMCACHED_OP_GET; - req->key = MEMCACHED_SESSION_ID_PREFIX; + req->key = MEMCACHED_SESSION_CACHE_KEY_PREFIX; req->key += util::format_hex(id, idlen); req->cb = [conn](MemcachedRequest *, MemcachedResult res) { if (LOG_ENABLED(INFO)) {