Skip to content

Commit 07ff81b

Browse files
committed
Introducing code example better.
1 parent 229543c commit 07ff81b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content/docs/d1/features/read-replication.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You can use D1 read replication by using D1 Sessions API. A Session encapsulates
1414

1515
By using Sessions API for read replication, all of your queries from a single Session read from a version of the database which is as up-to-date as your query. This ensures that the version of the database you are reading is logically consistent with your queries when using read replicas.
1616

17+
The following Worker code uses D1 Sessions API to use read replicas, and allows you to test the decrease in query latency when using read replication.
18+
1719
```js collapse={8-15, 24-31}
1820
export default {
1921
async fetch(request, env) {

0 commit comments

Comments
 (0)