TieredCache<T> constructor
TieredCache<T> (
- Cache<
T> _primary, - Cache<
T> _secondary, { - CacheManager? manager,
- String? name,
- Clock? clock,
- bool? statsEnabled,
- CacheStats? stats,
Builds a TieredCache with a primary and a secondary cache
_primary
: The primary Cache_secondary
: The secondary Cache- manager: An optional CacheManager
name
: The name of the cacheclock
: The source of time to be used on this, defaults to the system clock if not providedstatsEnabled
: If statistics should be collected, defaults to falsestats
: The statistics instance, defaults toDefaultCacheStats
Returns a TieredCache
Implementation
TieredCache(this._primary, this._secondary,
{this.manager,
String? name,
Clock? clock,
bool? statsEnabled,
CacheStats? stats})
: name = name ?? Uuid().v1(),
clock = clock ?? Clock(),
statsEnabled = statsEnabled ?? false,
stats = stats ?? DefaultCacheStats();