SSL_CTX_sess_set_cache_size.pod 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_sess_set_cache_size, SSL_CTX_sess_get_cache_size - manipulate session cache size
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. long SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, long t);
  7. long SSL_CTX_sess_get_cache_size(SSL_CTX *ctx);
  8. =head1 DESCRIPTION
  9. SSL_CTX_sess_set_cache_size() sets the size of the internal session cache
  10. of context B<ctx> to B<t>.
  11. This value is a hint and not an absolute; see the notes below.
  12. SSL_CTX_sess_get_cache_size() returns the currently valid session cache size.
  13. =head1 NOTES
  14. The internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT,
  15. currently 1024*20, so that up to 20000 sessions can be held. This size
  16. can be modified using the SSL_CTX_sess_set_cache_size() call. A special
  17. case is the size 0, which is used for unlimited size.
  18. If adding the session makes the cache exceed its size, then unused
  19. sessions are dropped from the end of the cache.
  20. Cache space may also be reclaimed by calling
  21. L<SSL_CTX_flush_sessions(3)> to remove
  22. expired sessions.
  23. If the size of the session cache is reduced and more sessions are already
  24. in the session cache, old session will be removed at the next time a
  25. session shall be added. This removal is not synchronized with the
  26. expiration of sessions.
  27. =head1 RETURN VALUES
  28. SSL_CTX_sess_set_cache_size() returns the previously valid size.
  29. SSL_CTX_sess_get_cache_size() returns the currently valid size.
  30. =head1 SEE ALSO
  31. L<ssl(7)>,
  32. L<SSL_CTX_set_session_cache_mode(3)>,
  33. L<SSL_CTX_sess_number(3)>,
  34. L<SSL_CTX_flush_sessions(3)>
  35. =head1 COPYRIGHT
  36. Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
  37. Licensed under the Apache License 2.0 (the "License"). You may not use
  38. this file except in compliance with the License. You can obtain a copy
  39. in the file LICENSE in the source distribution or at
  40. L<https://www.openssl.org/source/license.html>.
  41. =cut