diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-12-11 20:11:17 -0500 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-12-12 12:48:29 -0500 |
commit | acef181fde5f725f54e8e951618ac3bb38eaaca5 (patch) | |
tree | acc2ae32c2bf209dd18647caf1bd22fe17c6ec1f /lib/https.js | |
parent | f050cab3d850ad94dcf28746d1f942e706aa4e4f (diff) | |
download | node-new-acef181fde5f725f54e8e951618ac3bb38eaaca5.tar.gz |
https: support disabling session caching
Zero value of `maxCachedSessions` should disable TLS session caching in
`https.Agent`
PR-URL: https://github.com/nodejs/node/pull/4252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js index 90b6346bd9..6f97991f98 100644 --- a/lib/https.js +++ b/lib/https.js @@ -138,6 +138,10 @@ Agent.prototype._getSession = function _getSession(key) { }; Agent.prototype._cacheSession = function _cacheSession(key, session) { + // Cache is disabled + if (this.maxCachedSessions === 0) + return; + // Fast case - update existing entry if (this._sessionCache.map[key]) { this._sessionCache.map[key] = session; |