Compare commits

...

2 Commits

Author SHA1 Message Date
Steven Hall e1fdce020f log 2024-04-04 16:22:59 +02:00
Scott Cazan 84e01f255e small typo 2024-04-04 15:52:37 +02:00
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ Invalidate cache can be done at two levels using tags:
To invalidate and refetch the data cache, you can execute a POST request to `/~/gitbook/revalidate`:
```bash
curl --location --request POST 'https://gitbook/mycompany.com/~gitbook/revalidate' \
curl --location --request POST 'https://gitbook.mycompany.com/~gitbook/revalidate' \
--header 'Content-Type: application/json' \
--data-raw '{"tags": ["space.id"]}'
```
+1
View File
@@ -126,6 +126,7 @@ export function cache<Args extends any[], Result>(
// Try the memory backend, independently of the other backends as it doesn't have a network cost
const memoryEntry = await memoryCache.get(key);
if (memoryEntry) {
console.log(`${key} memcache ${Date.now()} setAt=${memoryEntry.meta.setAt} expiresAt=${memoryEntry.meta.expiresAt} revalidatesAt=${memoryEntry.meta.revalidatesAt}`)
span.setAttribute('memory', true);
result = [memoryEntry, 'memory'] as const;
} else {