Classes | |
class | BloomFilter |
a Bloom filter is a probablistic set, which returns either "probably in set" or "definitely not in set" More... | |
class | CallerStalenessCache |
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 | SynchronizedCallerStalenessCache |
simple wrapper on CallerStalenessCache (with the same API) - but internally synchronized in a way that is more performant than using RWSyncrhonzied<CallerStalenessCache<...>> More... | |
class | SynchronizedLRUCache |
simple wrapper on LRUCache (with the same API) - but internally synchronized in a way that is more performant than using RWSyncrhonzied<LRUCache<...>> More... | |
class | SynchronizedTimedCache |
class | TimedCache |
Keep track of a bunch of objects, each with an associated 'freshness' which meet a TimedCache-associated minimal reshness limit. More... | |
Variables | |
template<typename KEY > | |
static constexpr bool | IsKeyedCache = not same_as<KEY, void> |
\file
TODO:
\file
TODO:
PROBABLY add overload of Add() with one argument, IF VALUETYPE == KEYTYPE?
ADDED EXPERIMENTALLY in v2.1d6
But - REVIEW that usage to make sure it makes sense. Explain better here if/why it does.
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
\file
TODO:
\file
TODO:
@todo This class is logically a map. But you may want to have individual values with timed cache! Basically - KEY=RESULT? And then the arg to add/lookup don't take key? Maybe key is void? That maybe best. Template specialization where KEY=void? THEN - maybe reverse order of template params? VALUE/KEY - so then we can have KEY=void as default arg? NOTE - I DID this already for CallerStalenessCache, so pretty easy, but for the case where KEY=void, you can really use either so LOW PRIORITY. @todo Improve Regression Tests And Docs (quite weak) @todo Use Concepts or other such constraint on T/ELEMENT declarations (and docs) @todo Perhaps use Stroika Mapping<> instead of std::map<> - and in that way - we can use aribtrary externally specified map impl - so can use HASHING or BTREE, based on passed in arg. So we don't ahve problem with creating the default, specify default type to create in the TRAITS object (so for example, if using Hash, we don't force having operator< for BTREE 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.