Skip to content

Commit a493ee6

Browse files
authored
Merge pull request #102 from planetscale/disallow-fetch-caching
Explicitly disallow fetch() caching
2 parents 47d8561 + 5755c87 commit a493ee6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type Req = {
4040
method: string
4141
headers: Record<string, string>
4242
body: string
43+
cache?: RequestCache
4344
}
4445

4546
type Res = {
@@ -265,7 +266,8 @@ async function postJSON<T>(config: Config, url: string | URL, body = {}): Promis
265266
'Content-Type': 'application/json',
266267
'User-Agent': `database-js/${Version}`,
267268
Authorization: `Basic ${auth}`
268-
}
269+
},
270+
cache: 'no-store'
269271
})
270272

271273
if (response.ok) {

0 commit comments

Comments
 (0)