Blame doc/man3/SSL_CTX_sess_set_cache_size.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
SSL_CTX_sess_set_cache_size, SSL_CTX_sess_get_cache_size - manipulate session cache size
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/ssl.h>
Packit c4476c
Packit c4476c
 long SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, long t);
Packit c4476c
 long SSL_CTX_sess_get_cache_size(SSL_CTX *ctx);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
SSL_CTX_sess_set_cache_size() sets the size of the internal session cache
Packit c4476c
of context B<ctx> to B<t>.
Packit c4476c
This value is a hint and not an absolute; see the notes below.
Packit c4476c
Packit c4476c
SSL_CTX_sess_get_cache_size() returns the currently valid session cache size.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
The internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT,
Packit c4476c
currently 1024*20, so that up to 20000 sessions can be held. This size
Packit c4476c
can be modified using the SSL_CTX_sess_set_cache_size() call. A special
Packit c4476c
case is the size 0, which is used for unlimited size.
Packit c4476c
Packit c4476c
If adding the session makes the cache exceed its size, then unused
Packit c4476c
sessions are dropped from the end of the cache.
Packit c4476c
Cache space may also be reclaimed by calling
Packit c4476c
L<SSL_CTX_flush_sessions(3)> to remove
Packit c4476c
expired sessions.
Packit c4476c
Packit c4476c
If the size of the session cache is reduced and more sessions are already
Packit c4476c
in the session cache, old session will be removed at the next time a
Packit c4476c
session shall be added. This removal is not synchronized with the
Packit c4476c
expiration of sessions.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
SSL_CTX_sess_set_cache_size() returns the previously valid size.
Packit c4476c
Packit c4476c
SSL_CTX_sess_get_cache_size() returns the currently valid size.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ssl(7)>,
Packit c4476c
L<SSL_CTX_set_session_cache_mode(3)>,
Packit c4476c
L<SSL_CTX_sess_number(3)>,
Packit c4476c
L<SSL_CTX_flush_sessions(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut