19 #ifndef GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H
20 #define GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H
28 #include <openssl/ssl.h>
52 return grpc_core::MakeRefCounted<SslSessionLRUCache>(capacity);
76 void Remove(
Node* node);
77 void PushFront(
Node* node);
78 void AssertInvariants();
83 Node* use_order_list_head_ =
nullptr;
84 Node* use_order_list_tail_ =
nullptr;
85 size_t use_order_list_size_ = 0;
Definition: ref_counted.h:282
Definition: ref_counted_ptr.h:35
Node for single cached session.
Definition: ssl_session_cache.cc:53
Definition: ssl_session_cache.h:48
SslSessionPtr Get(const char *key)
Returns the session from the cache associated with key or null if not found.
Definition: ssl_session_cache.cc:143
SslSessionLRUCache & operator=(const SslSessionLRUCache &)=delete
static grpc_core::RefCountedPtr< SslSessionLRUCache > Create(size_t capacity)
Create new LRU cache with the given capacity.
Definition: ssl_session_cache.h:51
SslSessionLRUCache(size_t capacity)
Definition: ssl_session_cache.cc:85
void Put(const char *key, SslSessionPtr session)
Add session in the cache using key.
Definition: ssl_session_cache.cc:120
size_t Size()
Returns current number of sessions in the cache.
Definition: ssl_session_cache.cc:100
~SslSessionLRUCache() override
Definition: ssl_session_cache.cc:90
SslSessionLRUCache(const SslSessionLRUCache &)=delete
Cache for SSL sessions for sessions resumption.
Definition: ssl_session.h:40
std::unique_ptr< SSL_SESSION, SslSessionDeleter > SslSessionPtr
Definition: ssl_session.h:46
"pointer" to an AVL tree - this is a reference counted object - use grpc_avl_ref to add a reference,...
Definition: avl.h:58
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60