maxBytesFor method

int? maxBytesFor(
  1. MiniProgramCacheBucket bucket
)

Implementation

int? maxBytesFor(MiniProgramCacheBucket bucket) {
  return switch (bucket) {
    MiniProgramCacheBucket.data => maxDataBytes,
    MiniProgramCacheBucket.image => maxImageBytes,
    MiniProgramCacheBucket.audio => maxAudioBytes,
    MiniProgramCacheBucket.video => maxVideoBytes,
    MiniProgramCacheBucket.session => maxSessionBytes,
    MiniProgramCacheBucket.state => maxStateBytes,
    _ => null,
  };
}