From 72b17e15aea2f1360c5702517f5ac1093e3b450d Mon Sep 17 00:00:00 2001 From: nenizera Date: Fri, 29 Nov 2024 15:53:30 +0000 Subject: [PATCH] Update cache.mdx Links. --- src/content/docs/workers/runtime-apis/cache.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/docs/workers/runtime-apis/cache.mdx b/src/content/docs/workers/runtime-apis/cache.mdx index 7940df8a04d7f75..24e04d7fdaf0b02 100644 --- a/src/content/docs/workers/runtime-apis/cache.mdx +++ b/src/content/docs/workers/runtime-apis/cache.mdx @@ -43,7 +43,7 @@ let cache = caches.default; await cache.match(request); ``` -You may create and manage additional Cache instances via the [`caches.open`](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open) method. +You may create and manage additional Cache instances via the [caches.open](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open) method. ```js let myCache = await caches.open('custom:cache'); @@ -115,10 +115,10 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w * `request` string | Request - * Either a string or a [`Request`](/workers/runtime-apis/request/) object to serve as the key. If a string is passed, it is interpreted as the URL for a new Request object. + * Either a string or a [Request](/workers/runtime-apis/request/) object to serve as the key. If a string is passed, it is interpreted as the URL for a new Request object. * `response` Response - * A [`Response`](/workers/runtime-apis/response/) object to store under the given key. + * A [Response](/workers/runtime-apis/response/) object to store under the given key. @@ -127,7 +127,7 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w `cache.put` will throw an error if: * The `request` passed is a method other than `GET`. -* The `response` passed has a `status` of [`206 Partial Content`](https://www.webfx.com/web-development/glossary/http-status-codes/what-is-a-206-status-code/). +* The `response` passed has a `status` of [206 Partial Content](https://www.webfx.com/web-development/glossary/http-status-codes/what-is-a-206-status-code/). * The `response` passed contains the header `Vary: *`. The value of the `Vary` header is an asterisk (`*`). Refer to the [Cache API specification](https://w3c.github.io/ServiceWorker/#cache-put) for more information. #### Errors @@ -162,7 +162,7 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w * `request` string | Request - * The string or [`Request`](/workers/runtime-apis/request/) object used as the lookup key. Strings are interpreted as the URL for a new `Request` object. + * The string or [Request](/workers/runtime-apis/request/) object used as the lookup key. Strings are interpreted as the URL for a new `Request` object. * `options` * Can contain one possible property: `ignoreMethod` (Boolean). When `true`, the request is considered to be a `GET` request regardless of its actual value. @@ -229,7 +229,7 @@ The `cache.delete` method only purges content of the cache in the data center th * `request` string | Request - * The string or [`Request`](/workers/runtime-apis/request/) object used as the lookup key. Strings are interpreted as the URL for a new `Request` object. + * The string or [Request](/workers/runtime-apis/request/) object used as the lookup key. Strings are interpreted as the URL for a new `Request` object. * `options` object * Can contain one possible property: `ignoreMethod` (Boolean). Consider the request method a GET regardless of its actual value. @@ -241,6 +241,6 @@ The `cache.delete` method only purges content of the cache in the data center th ## Related resources * [How the cache works](/workers/reference/how-the-cache-works/) -* [Example: Cache using `fetch()`](/workers/examples/cache-using-fetch/) +* [Example: Cache using fetch()](/workers/examples/cache-using-fetch/) * [Example: using the Cache API](/workers/examples/cache-api/) * [Example: caching POST requests](/workers/examples/cache-post-request/)