168349Sobrien=pod
268349Sobrien
368349Sobrien=head1 NAME
468349Sobrien
568349SobrienSSL_CTX_sess_set_cache_size, SSL_CTX_sess_get_cache_size - manipulate session cache size
668349Sobrien
768349Sobrien=head1 SYNOPSIS
868349Sobrien
968349Sobrien #include <openssl/ssl.h>
1068349Sobrien
1168349Sobrien long SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, long t);
1268349Sobrien long SSL_CTX_sess_get_cache_size(SSL_CTX *ctx);
1368349Sobrien
1468349Sobrien=head1 DESCRIPTION
1568349Sobrien
1668349SobrienSSL_CTX_sess_set_cache_size() sets the size of the internal session cache
17103373Sobrienof context B<ctx> to B<t>.
18103373Sobrien
19103373SobrienSSL_CTX_sess_get_cache_size() returns the currently valid session cache size.
20103373Sobrien
2168349Sobrien=head1 NOTES
22103373Sobrien
23103373SobrienThe internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT,
24103373Sobriencurrently 1024*20, so that up to 20000 sessions can be held. This size
25103373Sobriencan be modified using the SSL_CTX_sess_set_cache_size() call. A special
26103373Sobriencase is the size 0, which is used for unlimited size.
27103373Sobrien
28103373SobrienWhen the maximum number of sessions is reached, no more new sessions are
29103373Sobrienadded to the cache. New space may be added by calling
30103373SobrienL<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> to remove
31103373Sobrienexpired sessions.
32103373Sobrien
33103373SobrienIf the size of the session cache is reduced and more sessions are already
34103373Sobrienin the session cache, old session will be removed at the next time a
35103373Sobriensession shall be added. This removal is not synchronized with the
36103373Sobrienexpiration of sessions.
37103373Sobrien
38103373Sobrien=head1 RETURN VALUES
39103373Sobrien
40103373SobrienSSL_CTX_sess_set_cache_size() returns the previously valid size.
41103373Sobrien
42103373SobrienSSL_CTX_sess_get_cache_size() returns the currently valid size.
4368349Sobrien
4468349Sobrien=head1 SEE ALSO
4568349Sobrien
4668349SobrienL<ssl(3)|ssl(3)>,
4768349SobrienL<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
4868349SobrienL<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
49133359SobrienL<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
50133359Sobrien
5168349Sobrien=cut
5268349Sobrien