Skip to content

Commit 9bd394c

Browse files
committed
Functions: Fix cache example
1 parent 5db4a28 commit 9bd394c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_includes/content/functions/runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following example gets a JSON value through the cache, only invoking the cal
4242

4343
```js
4444
const ttl = 5 * 60 * 1000 // 5 minutes
45-
const val = await cache.load("mycachekey", ttl, () => {
45+
const val = await cache.load("mycachekey", ttl, async () => {
4646
const res = await fetch("http://echo.jsontest.com/key/value/one/two")
4747
const data = await res.json()
4848
return data

0 commit comments

Comments
 (0)