]>
Commit | Line | Data |
---|---|---|
0bc6597d LJ |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | SSL_CTX_sess_set_cache_size, SSL_CTX_sess_get_cache_size - manipulate session cache size | |
6 | ||
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/ssl.h> | |
10 | ||
11 | long SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, long t); | |
12 | long SSL_CTX_sess_get_cache_size(SSL_CTX *ctx); | |
13 | ||
14 | =head1 DESCRIPTION | |
15 | ||
16 | SSL_CTX_sess_set_cache_size() sets the size of the internal session cache | |
17 | of context B<ctx> to B<t>. | |
e9edfc41 | 18 | This value is a hint and not an absolute; see the notes below. |
0bc6597d LJ |
19 | |
20 | SSL_CTX_sess_get_cache_size() returns the currently valid session cache size. | |
21 | ||
22 | =head1 NOTES | |
23 | ||
24 | The internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT, | |
25 | currently 1024*20, so that up to 20000 sessions can be held. This size | |
26 | can be modified using the SSL_CTX_sess_set_cache_size() call. A special | |
27 | case is the size 0, which is used for unlimited size. | |
28 | ||
e9edfc41 RS |
29 | If adding the session makes the cache exceed its size, then unused |
30 | sessions are dropped from the end of the cache. | |
31 | Cache space may also be reclaimed by calling | |
9b86974e | 32 | L<SSL_CTX_flush_sessions(3)> to remove |
0bc6597d LJ |
33 | expired sessions. |
34 | ||
35 | If the size of the session cache is reduced and more sessions are already | |
36 | in the session cache, old session will be removed at the next time a | |
37 | session shall be added. This removal is not synchronized with the | |
38 | expiration of sessions. | |
39 | ||
40 | =head1 RETURN VALUES | |
41 | ||
42 | SSL_CTX_sess_set_cache_size() returns the previously valid size. | |
43 | ||
44 | SSL_CTX_sess_get_cache_size() returns the currently valid size. | |
45 | ||
46 | =head1 SEE ALSO | |
47 | ||
9b86974e RS |
48 | L<ssl(3)>, |
49 | L<SSL_CTX_set_session_cache_mode(3)>, | |
50 | L<SSL_CTX_sess_number(3)>, | |
51 | L<SSL_CTX_flush_sessions(3)> | |
0bc6597d LJ |
52 | |
53 | =cut |