operator [] method

  1. @override
Future operator [](
  1. String key
)
override

Get the cache value for the specified key.

  • key: the key

Implementation

@override
Future<dynamic> operator [](String key) {
  return _primary[key]
      .then((value) => value != null ? Future.value(value) : _secondary[key]);
}