proxygen
|
#include <SynchronizedLruPskCache.h>
Public Types | |
using | EvictingPskMap = folly::EvictingCacheMap< std::string, CachedPsk > |
Public Member Functions | |
~SynchronizedLruPskCache () override=default | |
SynchronizedLruPskCache (uint64_t mapMax) | |
folly::Optional< CachedPsk > | getPsk (const std::string &identity) override |
void | putPsk (const std::string &identity, CachedPsk psk) override |
void | removePsk (const std::string &identity) override |
Public Member Functions inherited from fizz::client::PskCache | |
virtual | ~PskCache ()=default |
Private Attributes | |
folly::Synchronized< EvictingPskMap > | cache_ |
PSK cache that provides synchronization and caps the number of PSKs stored internally. When the limit is reached, the least recently used PSK is evicted.
Definition at line 23 of file SynchronizedLruPskCache.h.
using fizz::client::SynchronizedLruPskCache::EvictingPskMap = folly::EvictingCacheMap<std::string, CachedPsk> |
Definition at line 25 of file SynchronizedLruPskCache.h.
|
overridedefault |
|
explicit |
Definition at line 14 of file SynchronizedLruPskCache.cpp.
|
overridevirtual |
Retrieve a PSK for the specified identity.
Implements fizz::client::PskCache.
Definition at line 17 of file SynchronizedLruPskCache.cpp.
References cache_, and folly::none.
|
overridevirtual |
Add a new PSK for identity to the cache.
Implements fizz::client::PskCache.
Definition at line 28 of file SynchronizedLruPskCache.cpp.
References cache_, and folly::gen::move.
|
overridevirtual |
Remove any PSKs associated with identity from the cache.
Implements fizz::client::PskCache.
Definition at line 35 of file SynchronizedLruPskCache.cpp.
References cache_.
|
private |
Definition at line 36 of file SynchronizedLruPskCache.h.
Referenced by getPsk(), putPsk(), and removePsk().