nghttpx: Change session cache key prefix

This commit is contained in:
Tatsuhiro Tsujikawa 2015-07-27 21:16:57 +09:00
parent bb228c27de
commit a4a9cfd650
1 changed files with 4 additions and 3 deletions

View File

@ -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<MemcachedRequest>();
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<MemcachedRequest>();
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)) {