get method

Future<Uint8List?> get(
  1. String key
)

Implementation

Future<Uint8List?> get(String key) async {
  // L1 SIEVE
  final memHit = _sieveGet(key);
  if (memHit != null) return memHit;

  // L2 disk
  final diskHit = await _diskGet(key);
  if (diskHit != null && diskHit.isNotEmpty) {
    _sievePut(key, diskHit);
    return diskHit;
  }

  return null;
}