shallCache method

bool shallCache(
  1. Asset asset,
  2. int assetSize
)

Whether the given asset shall be cached. *

  • Default: it returns true if assetSize is not greater than cacheThreshold.
  • You override this method if necessary.
    • assetSize - the size of asset in bytes.

Implementation

bool shallCache(Asset asset, int assetSize) => assetSize <= cacheThreshold;