From da6a097dcc4c655c4eb0270718ef18a8ff2d5642 Mon Sep 17 00:00:00 2001 From: Guilherme Rezende Date: Tue, 5 May 2015 00:25:29 -0300 Subject: [PATCH] adding crypto/tls sessioncache --- server/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/server.go b/server/server.go index d6f20abc..2416f21d 100644 --- a/server/server.go +++ b/server/server.go @@ -132,6 +132,9 @@ func ListenAndServeTLSWithSNI(srv *http.Server, tlsConfigs []TLSConfig) error { } config.BuildNameToCertificate() + // Add a session cache LRU algorithm with default capacity (64) + config.ClientSessionCache = tls.NewLRUClientSessionCache(0) + conn, err := net.Listen("tcp", addr) if err != nil { return err