requestCacheNames method

Future<List<Cache>> requestCacheNames({
  1. String? securityOrigin,
  2. String? storageKey,
  3. StorageBucket? storageBucket,
})

Requests cache names. securityOrigin At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin. storageKey Storage key. storageBucket Storage bucket. If not specified, it uses the default bucket. Returns: Caches for the security origin.

Implementation

Future<List<Cache>> requestCacheNames(
    {String? securityOrigin,
    String? storageKey,
    storage.StorageBucket? storageBucket}) async {
  var result = await _client.send('CacheStorage.requestCacheNames', {
    if (securityOrigin != null) 'securityOrigin': securityOrigin,
    if (storageKey != null) 'storageKey': storageKey,
    if (storageBucket != null) 'storageBucket': storageBucket,
  });
  return (result['caches'] as List)
      .map((e) => Cache.fromJson(e as Map<String, dynamic>))
      .toList();
}