CacheStorage#
This CDP domain is experimental.
Types#
Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.
- class CachedResponseType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
type of HTTP response cached
- BASIC = 'basic'#
- CORS = 'cors'#
- DEFAULT = 'default'#
- ERROR = 'error'#
- OPAQUE_RESPONSE = 'opaqueResponse'#
- OPAQUE_REDIRECT = 'opaqueRedirect'#
- class DataEntry(request_url, request_method, request_headers, response_time, response_status, response_status_text, response_type, response_headers)[source]#
Data entry.
-
response_type:
CachedResponseType# HTTP response type
-
response_type:
- class Cache(cache_id, security_origin, storage_key, cache_name, storage_bucket=None)[source]#
Cache identifier.
-
storage_bucket:
Optional[StorageBucket] = None# Storage bucket of the cache.
-
storage_bucket:
Commands#
Each command is a generator function. The return
type Generator[x, y, z] indicates that the generator
yields arguments of type x, it must be resumed with
an argument of type y, and it returns type z. In
this library, types x and y are the same for all
commands, and z is the return type you should pay attention
to. For more information, see
Getting Started: Commands.
- request_cache_names(security_origin=None, storage_key=None, storage_bucket=None)[source]#
Requests cache names.
- Parameters:
security_origin (
Optional[str]) – (Optional) At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.storage_bucket (
Optional[StorageBucket]) – (Optional) Storage bucket. If not specified, it uses the default bucket.
- Return type:
- Returns:
Caches for the security origin.
- request_entries(cache_id, skip_count=None, page_size=None, path_filter=None)[source]#
Requests data from cache.
- Parameters:
cache_id (
CacheId) – ID of cache to get entries from.skip_count (
Optional[int]) – (Optional) Number of records to skip.page_size (
Optional[int]) – (Optional) Number of records to fetch.path_filter (
Optional[str]) – (Optional) If present, only return the entries containing this substring in the path
- Return type:
Generator[Dict[str,Any],Dict[str,Any],Tuple[List[DataEntry],float]]- Returns:
A tuple with the following items:
cacheDataEntries - Array of object store data entries.
returnCount - Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
Events#
There are no events in this module.