Make the input parameters for SSL_SESSION_set1_master_key const
[openssl.git] / doc / man3 / SSL_CTX_sess_set_cache_size.pod
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>.
18 This value is a hint and not an absolute; see the notes below.
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
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
32 L<SSL_CTX_flush_sessions(3)> to remove
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
48 L<ssl(7)>,
49 L<SSL_CTX_set_session_cache_mode(3)>,
50 L<SSL_CTX_sess_number(3)>,
51 L<SSL_CTX_flush_sessions(3)>
52
53 =head1 COPYRIGHT
54
55 Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
56
57 Licensed under the OpenSSL license (the "License").  You may not use
58 this file except in compliance with the License.  You can obtain a copy
59 in the file LICENSE in the source distribution or at
60 L<https://www.openssl.org/source/license.html>.
61
62 =cut