CacheEvictionScheduler class

Background scheduler that periodically runs CacheManager.evict.

This intentionally does only scheduling and overlap protection. The actual eviction logic stays inside cache backends and EvictionPolicy.

Constructors

CacheEvictionScheduler({required CacheManager cacheManager, required EvictionPolicy policy, required Duration startupDelay, required Duration interval, required bool runOnStartup, void onRunCompleted(EvictionResult result)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runNow({String reason = 'manual'}) Future<void>
Triggers an immediate run unless another run is already active.
start() → void
Starts startup and periodic timers.
stop() Future<void>
Stops timers and waits for any in-flight run to finish.
toString() String
A string representation of this object.
inherited

Operators

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