EvictionScheduler class

A class that schedules cache eviction based on various conditions.

Constructors

EvictionScheduler.new(dynamic cache)
Creates a new instance of EvictionScheduler.

Properties

conditions Set<EvictionTiming>
Gets the conditions that must be met for eviction to run.
no setter
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Gets whether the scheduler is running.
no setter
lastEvictionTime DateTime?
Gets the last time eviction was run.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledTimes List<TimeOfDay>
Gets the scheduled eviction times.
no setter

Methods

dispose() → void
Disposes the scheduler.
evictNow() Future<void>
Runs eviction immediately, regardless of conditions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scheduleAtTimes(List<TimeOfDay> times) → void
Schedules eviction to run at specific times of day.
scheduleInBackground() → void
Schedules eviction to run when the app is in the background.
scheduleOnIdle() → void
Schedules eviction to run when the app is idle.
scheduleOnWifi() → void
Schedules eviction to run when the device is connected to Wi-Fi.
schedulePeriodic(Duration frequency, {Duration? minInterval}) → void
Schedules eviction to run periodically.
scheduleWhileCharging() → void
Schedules eviction to run when the device is charging.
stop() → void
Stops the scheduler.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited