newTieredCache<T> function

Cache<T> newTieredCache<T>(
  1. CacheManager? manager,
  2. Cache<T> primary,
  3. Cache<T> secondary, {
  4. String? name,
  5. bool? statsEnabled,
  6. CacheStats? stats,
})

Builds a new Tiered Cache

  • manager: An optional CacheManager
  • primary: The primary cache
  • secondary: The secondary cache
  • name: The name of the cache
  • statsEnabled: If statistics should be collected, defaults to false
  • stats: The statistics instance

Implementation

Cache<T> newTieredCache<T>(
    CacheManager? manager, Cache<T> primary, Cache<T> secondary,
    {String? name, bool? statsEnabled, CacheStats? stats}) {
  return (manager ?? CacheManager.instance).newTieredCache(primary, secondary,
      name: name, statsEnabled: statsEnabled, stats: stats);
}