Skip to content

Commit 72b17e1

Browse files
authored
Update cache.mdx
Links.
1 parent b5febb4 commit 72b17e1

File tree

1 file changed

+7
-7
lines changed
  • src/content/docs/workers/runtime-apis

1 file changed

+7
-7
lines changed

src/content/docs/workers/runtime-apis/cache.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let cache = caches.default;
4343
await cache.match(request);
4444
```
4545

46-
You may create and manage additional Cache instances via the [`caches.open`](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open) method.
46+
You may create and manage additional Cache instances via the [caches.open](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open) method.
4747

4848
```js
4949
let myCache = await caches.open('custom:cache');
@@ -115,10 +115,10 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w
115115

116116
* `request` string | Request
117117

118-
* 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.
118+
* 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.
119119

120120
* `response` Response
121-
* A [`Response`](/workers/runtime-apis/response/) object to store under the given key.
121+
* A [Response](/workers/runtime-apis/response/) object to store under the given key.
122122

123123

124124

@@ -127,7 +127,7 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w
127127
`cache.put` will throw an error if:
128128

129129
* The `request` passed is a method other than `GET`.
130-
* 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/).
130+
* 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/).
131131
* 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.
132132

133133
#### Errors
@@ -162,7 +162,7 @@ The `stale-while-revalidate` and `stale-if-error` directives are not supported w
162162

163163
* `request` string | Request
164164

165-
* 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.
165+
* 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.
166166

167167
* `options`
168168
* 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
229229

230230
* `request` string | Request
231231

232-
* 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.
232+
* 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.
233233

234234
* `options` object
235235
* 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
241241
## Related resources
242242

243243
* [How the cache works](/workers/reference/how-the-cache-works/)
244-
* [Example: Cache using `fetch()`](/workers/examples/cache-using-fetch/)
244+
* [Example: Cache using fetch()](/workers/examples/cache-using-fetch/)
245245
* [Example: using the Cache API](/workers/examples/cache-api/)
246246
* [Example: caching POST requests](/workers/examples/cache-post-request/)

0 commit comments

Comments
 (0)