mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
636b868bf1
Co-authored-by: Johan Preynat <johan.preynat@gmail.com>
23 lines
987 B
Markdown
23 lines
987 B
Markdown
# `@gitbook/cache-do`
|
|
|
|
Cache backend, powered by Cloudflare Durable Objects. The cache is optimized for GitBook use-cases.
|
|
|
|
### Performances
|
|
|
|
The cache backend is optimized for performances by being distributed and accessible close to the worker locations that are reading it.
|
|
|
|
### Geo-distribution
|
|
|
|
To achieve a good balance between **performances** and **consistency**, cache objects are distributed over 7 locations, representing continents.
|
|
|
|
It makes it possible to purge all 7 locations in one go and achieve fast consistency.
|
|
|
|
### Concepts
|
|
|
|
**Cache tag**: unique tag in the cache environment. A cache tag groups multiple keys that should be purged together in one operation.
|
|
Cache tags should not contain a large set of unique keys. Exceeding thousands could lead to performances or reliability issues.
|
|
|
|
**Cache key**: unique key in the cache environment. Each key should be assigned to a `tag`.
|
|
|
|
**Location**: cache is distributed over 7 unique locations, one for each continent.
|