Syntax: | ssl_session_cache
|
---|---|
Default: | ssl_session_cache none; |
Context: | stream , server |
Sets the types and sizes of caches that store session parameters. A cache can be of any of the following types:
off
- the use of a session cache is strictly prohibited: nginx explicitly tells a client that sessions may not be reused.
none
- the use of a session cache is gently disallowed: nginx tells a client that sessions may be reused, but does not actually store session parameters in the cache.
builtin
- a cache built in OpenSSL; used by one worker process only. The cache size is specified in sessions. If size is not given, it is equal to 20480 sessions. Use of the built-in cache can cause memory fragmentation.
shared
- a cache shared between all worker processes. The cache size is specified in bytes; one megabyte can store about 4000 sessions. Each shared cache should have an arbitrary name. A cache with the same name can be used in several servers.
Both cache types can be used simultaneously, for example:
ssl_session_cache builtin:1000 shared:SSL:10m;
but using only shared cache without the built-in cache should be more efficient.
Please login to continue.