evictNow method

Future<void> evictNow()

Runs eviction immediately, regardless of conditions.

Implementation

Future<void> evictNow() async {
  if (_eviction == null) {
    _log.warning('No eviction strategy available');
    return;
  }

  try {
    _log.info('Running eviction now');
    await _eviction.checkAndEvict();
    _lastEvictionTime = DateTime.now();
    _log.info('Eviction completed');
  } catch (e) {
    _log.severe('Error during eviction: $e');
  }
}