putEntry method

  1. @override
Future<void> putEntry(
  1. String name,
  2. String key,
  3. CacheEntry entry
)
override

Puts a cache entry identified by key on the named cache CacheStore. The value is overriden if already exists or added if it does not exists.

  • name: The cache name
  • key: The cache key
  • entry: The cache entry

Implementation

@override
Future<void> putEntry(String name, String key, CacheEntry entry) {
  if (!_store.containsKey(name)) {
    _store[name] = {};
  }

  _cacheStore(name)[key] = entry;

  return Future.value();
}