SSL_CTX_sess_set_cache_size.pod 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. SSL_CTX_sess_get_cache_size() returns the currently valid session cache size.
  12. =head1 NOTES
  13. The internal session cache size is SSL_SESSION_CACHE_MAX_SIZE_DEFAULT,
  14. currently 1024*20, so that up to 20000 sessions can be held. This size
  15. can be modified using the SSL_CTX_sess_set_cache_size() call. A special
  16. case is the size 0, which is used for unlimited size.
  17. When the maximum number of sessions is reached, no more new sessions are
  18. added to the cache. New space may be added by calling
  19. L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> to remove
  20. expired sessions.
  21. If the size of the session cache is reduced and more sessions are already
  22. in the session cache, old session will be removed at the next time a
  23. session shall be added. This removal is not synchronized with the
  24. expiration of sessions.
  25. =head1 RETURN VALUES
  26. SSL_CTX_sess_set_cache_size() returns the previously valid size.
  27. SSL_CTX_sess_get_cache_size() returns the currently valid size.
  28. =head1 SEE ALSO
  29. L<ssl(3)|ssl(3)>,
  30. L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
  31. L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
  32. L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
  33. =cut