◆ constructor()
| ShareUsageTracker::constructor | ( | { size=1000, interval=1200000 } = {}
| ) |
inline
Constructor for ShareUsageTracker.
- Parameters
-
- {object} - options options for share usage tracker
- {number} - options.size size of the share usage lru cache
- {number} - options.interval if identical evidence values are seen by the tracker within this interval (in milliseconds) it will be ignored by the tracker.
◆ get()
ShareUsageTracker::get ( cacheKey ) inlineRetreive entry from cache.
- Parameters
-
- {object} - cacheKey key value store of evidence to lookup
- Returns
- {*} value stored in cache
◆ match()
ShareUsageTracker::match ( key, value ) inlineFunction to check if we should put the evidence in the cache.
- Parameters
-
- {string} - key key of piece of evidence
- {*} - value value of piece of evidence
- Returns
- {boolean} whether put in cache
◆ put()
ShareUsageTracker::put ( cacheKey ) inlinePut entry in cache.
- Parameters
-
- {object} - cacheKey key value store of evidence to place in cache
