← Back to CacheStorage domain
CacheStorage.requestCachedResponse
Fetches cache entry.
Domain: CacheStorage
experimental
Parameters
| Name | Type | Description |
cacheId | CacheId | Id of cache that contains the entry. |
requestURL | string | URL spec of the request. |
requestHeaders | array | headers of the request. |
Returns
| Name | Type | Description |
response | CachedResponse | Response read from the cache. |
Example Request
{
"id": 1,
"method": "CacheStorage.requestCachedResponse",
"params": {
"cacheId": "cacheId-value",
"requestURL": "requestURL-value",
"requestHeaders": []
}
}
Example Response
{
"id": 1,
"result": {
"response": "response-value"
}
}
Usage in Node.js
const result = await send('CacheStorage.requestCachedResponse', {"cacheId": "cacheId-value", "requestURL": "requestURL-value", "requestHeaders": []});
console.log(result);
// {"response": "response-value"}