Skip to content

Commit f9bce42

Browse files
committed
fix: cache ok responses
1 parent 16df06c commit f9bce42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/client/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ export class DefaultDelegatedRoutingV1HttpApiClient implements DelegatedRoutingV
397397
const key = `${requestMethod}-${url}`
398398

399399
// Only try to use cache for GET requests
400-
if (requestMethod === 'GET') {
400+
if (requestMethod === 'GET' && this.cache != null) {
401401
const cachedResponse = await this.cache?.match(url)
402402
if (cachedResponse?.ok === true) {
403403
// Check if the cached response has expired

0 commit comments

Comments
 (0)