clear method

void clear ()

Evicts all entries from the cache.

This is useful if, for instance, the root asset bundle has been updated and therefore new images must be obtained.

Images which have not finished loading yet will not be removed from the cache, and when they complete they will be inserted as normal.

Implementation

void clear() {
  _cache.clear();
  _pendingImages.clear();
  _currentSizeBytes = 0;
}