configure static method
Re-scales the owned store to imageDiskCacheBytes and points the loader
default at it. A no-op when the object count is unchanged, so the
defaults path never churns the store. The superseded manager is left for
collection: same-key opens share one single-instance sqlite handle, so
there is no second connection to close, and loads already in flight on
the old manager finish against its files normally. (Closing it here
would race its still-pending open and could drop those loads.)
Implementation
static void configure({required int imageDiskCacheBytes}) {
final maxObjects = maxObjectsForBytes(imageDiskCacheBytes);
if (maxObjects == _instance.config.maxNrOfCacheObjects) {
CachedNetworkImageProvider.defaultCacheManager = _instance;
return;
}
_instance = DigiaImageCacheManager._(maxObjects);
CachedNetworkImageProvider.defaultCacheManager = _instance;
}