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