setMaxSize method

Future<void> setMaxSize(
  1. int? maxSize
)

Changes the maximum number of bytes the cache can store and queues a job to trim the existing store, if necessary.

Implementation

Future<void> setMaxSize(int? maxSize) => _lock.synchronized(() {
      _maxSize = maxSize;
      if (_initialized) {
        _cleanup();
      }
    });