Namespaces | |
| namespace | LRUCacheSupport |
| namespace | TimedCacheSupport |
Classes | |
| class | BloomFilter |
| a Bloom filter is a probablistic set, which returns either "probably in set" or "definitely not in set" More... | |
| class | LRUCache |
| LRUCache implements a simple least-recently-used caching strategy, with optional hashing (of keys) to make it faster. More... | |
| class | Memoizer |
| Cache the results of expensive computations transparently. More... | |
| class | TimedCache |
| Keep track of a bunch of objects, each with an associated time used to allow data to 'expire'. More... | |
Concepts | |
| concept | IKey |
| A KEY is any copyable value (or the sentinal type void - indicating a keyless - single valued - cache) | |
| concept | IValue |
| any copyable type can use used as the value, or the special sentinal type - ValuelessSentinalType, used to indicate we are just caching presence/absense of the KEY in the cache (and its expiration date). | |
| concept | ICache |
| Check if the argument CACHE is a valid 'stroika cache' class, following its api. | |
Typedefs | |
| using | NonKeyedKeySentinalType = void |
| This sentinal value can be used as the KEY type for a Cache to indicate it is un-keyed, and there is just one. | |
| using | ValuelessSentinalType = void |
| This sentinal value can be used as the VALUE type for a Cache to indicate it just stores ONLY the KEYS (and sometimes related time/expiration) information. | |
| template<typename KEY , typename VALUE , LRUCacheSupport::ITraits< KEY, VALUE > TRAITS = LRUCacheSupport::DefaultTraits<KEY, VALUE>> | |
| using | SynchronizedLRUCache = LRUCache< KEY, VALUE, LRUCacheSupport::InternallySynchronizedTraits< TRAITS > > |
| template<typename KEY , typename VALUE , TimedCacheSupport::ITraits< KEY, VALUE > TRAITS = TimedCacheSupport::DefaultTraits<KEY, VALUE>> | |
| using | SynchronizedTimedCache = TimedCache< KEY, VALUE, TimedCacheSupport::InternallySynchronizedTraits< TRAITS > > |
| SynchronizedTimedCache just adds eInternallySynchronized to a regular 'TimedCache' (just short-hand). | |
Variables | |
| template<typename KEY > | |
| static constexpr bool | IKeyedCache = not same_as<KEY, NonKeyedKeySentinalType> |
| does this cache have a KEY type (overwhelming YES, but sometimes handy to have 'singleton' cache, where you cache something, but just one of them) | |
| template<typename VALUE > | |
| static constexpr bool | IValuelessCache = same_as<VALUE, ValuelessSentinalType> |
| Some caches (rare) only support a KEY, with no associated value (the value is stored INSIDE the key itself) | |
\file
TODO:
Also somewhat related, _Last usage is C++ unconvnetional - though maybe OK. If not more awkward in impl, consider using _fEnd? Or if it is (I think last maybe better then document clearly why its better.
TODO:
\file
TODO:
AND RELATED cleanup to spec using InOrderComparerType - as opposed to EQUALS COMPARER or other stuff like HashFunctions! MAYBE LOSE inorder comparer arg - and INSTEAD have template / template for creating container (for now its map<>??)
Implementation Note:
This module uses stl:map<> instead of a Stroika Mapping since we are comfortable with the current implementation using btree's, and to avoid any dependencies between Caching and Containers. We may want to re-think that, and just use Mapping here.
| using Stroika::Foundation::Cache::ValuelessSentinalType = typedef void |
This sentinal value can be used as the VALUE type for a Cache to indicate it just stores ONLY the KEYS (and sometimes related time/expiration) information.
Also, this can be used like KeyedCollection - where the main object acts like a KEY and value at the same time (often just internally has a KEY field).
Definition at line 45 of file Foundation/Cache/Common.h.
| using Stroika::Foundation::Cache::SynchronizedLRUCache = typedef LRUCache<KEY, VALUE, LRUCacheSupport::InternallySynchronizedTraits<TRAITS> > |
DEPRECATED CLASS TEMPLATES
Definition at line 494 of file LRUCache.inl.
| using Stroika::Foundation::Cache::SynchronizedTimedCache = typedef TimedCache<KEY, VALUE, TimedCacheSupport::InternallySynchronizedTraits<TRAITS> > |
SynchronizedTimedCache just adds eInternallySynchronized to a regular 'TimedCache' (just short-hand).
| KEY | |
| VALUE | |
| TRAITS |
Definition at line 1171 of file TimedCache.h.
|
staticconstexpr |
Some caches (rare) only support a KEY, with no associated value (the value is stored INSIDE the key itself)
Definition at line 61 of file Foundation/Cache/Common.h.