requestCacheNames method

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

Requests cache names. securityOrigin At least and at most one of securityOrigin, storageKey must be specified. Security origin. storageKey Storage key. Returns: Caches for the security origin.

Implementation

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