|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
Bounded thread-local string cache with auto-eviction. More...
#include <fdl_tl_cache.h>
Public Member Functions | |
| std::string & | get (const Key &key) |
| Get or create a cached string entry for the given key. | |
Bounded thread-local string cache with auto-eviction.
When the number of cached entries reaches fdl::constants::kTlCacheMaxEntries, the cache is cleared entirely before the new entry is inserted.
| Key | Cache key type (must be hashable and equality-comparable). |
| Hash | Hash functor for Key. |
|
inline |
Get or create a cached string entry for the given key.
If the cache exceeds the size limit, it is cleared first. The returned reference is valid until the next call to get() that triggers eviction.
| key | The cache key to look up. |