SSL_CTX_sess_set_cache_size.pod revision 72613
172613Skris=pod 272613Skris 372613Skris=head1 NAME 472613Skris 572613SkrisSSL_CTX_sess_set_cache_size, SSL_CTX_sess_get_cache_size - manipulate session cache size 672613Skris 772613Skris=head1 SYNOPSIS 872613Skris 972613Skris #include <openssl/ssl.h> 1072613Skris 1172613Skris long SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, long t); 1272613Skris long SSL_CTX_sess_get_cache_size(SSL_CTX *ctx); 1372613Skris 1472613Skris=head1 DESCRIPTION 1572613Skris 1672613SkrisSSL_CTX_sess_set_cache_size() sets the size of the internal session cache 1772613Skrisof context B<ctx> to B<t>. 1872613Skris 1972613SkrisSSL_CTX_sess_get_cache_size() returns the currently valid session cache size. 2072613Skris 2172613Skris=head1 NOTES 2272613Skris 2372613SkrisThe internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT, 2472613Skriscurrently 1024*20, so that up to 20000 sessions can be held. This size 2572613Skriscan be modified using the SSL_CTX_sess_set_cache_size() call. A special 2672613Skriscase is the size 0, which is used for unlimited size. 2772613Skris 2872613SkrisWhen the maximum number of sessions is reached, no more new sessions are 2972613Skrisadded to the cache. New space may be added by calling 3072613SkrisL<SSL_CTX_flush_sessions(3)|<SSL_CTX_flush_sessions(3)> to remove 3172613Skrisexpired sessions. 3272613Skris 3372613SkrisIf the size of the session cache is reduced and more sessions are already 3472613Skrisin the session cache, old session will be removed at the next time a 3572613Skrissession shall be added. This removal is not synchronized with the 3672613Skrisexpiration of sessions. 3772613Skris 3872613Skris=head1 RETURN VALUES 3972613Skris 4072613SkrisSSL_CTX_sess_set_cache_size() returns the previously valid size. 4172613Skris 4272613SkrisSSL_CTX_sess_get_cache_size() returns the currently valid size. 4372613Skris 4472613Skris=head1 SEE ALSO 4572613Skris 4672613SkrisL<ssl(3)|ssl(3)>, 4772613SkrisL<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>, 4872613SkrisL<SSL_CTX_flush_sessions(3)|<SSL_CTX_flush_sessions(3)> 4972613Skris 5072613Skris=cut 51