Skip to content

Commit 55d1e53

Browse files
authored
More resilient caching and use of KV (#222)
* Add unit tests for "race" * Reduce to 80s * Implement a Cloudflare KV cache * Format * Lint * Fix tagging of entries in KV * No longer use HTTP cache tags * Simplify tags to only keep 2 * Implement a blockFallback logic * Improve the block fallback logic * More tests * Start introducing a always optional signal on all cache ops * Correctly pass signal end to end * Fix one more case and add tests * Fix it * Add test for error * Fix error handling * Simplify even more * Improve logs * Improve logs / measurements * Fix timing * Fix read cache duration and add minor tests * Log redis time * Change replication logic * Fix redis errors * Log more * More logs and test memory first * Improve tracing for cache backends * Ignore all dependencies * Log the key in the cache low level traces
1 parent 7d04336 commit 55d1e53

File tree

20 files changed

+1064
-333
lines changed

20 files changed

+1064
-333
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### API ###
44

55
## API token to use when looking up the published content
6+
# GITBOOK_API_URL=https://api.gitbook.com
67
# GITBOOK_TOKEN=xxx
78

89
## User agent to use when making requests to the API

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
node_modules
55
/.pnp
66
.pnp.js
77

bun.lockb

-392 Bytes
Binary file not shown.

packages/react-contentkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"main": "./src/index.ts",
44
"dependencies": {
55
"classnames": "^2.5.1",
6-
"@gitbook/api": "^0.34.0",
6+
"@gitbook/api": "^0.35.0",
77
"assert-never": "^1.2.1"
88
},
99
"peerDependencies": {

0 commit comments

Comments
 (0)