Skip to content

Commit bd97268

Browse files
authored
fix(explorer): disable caching for API routes (#3807)
1 parent 6031ec8 commit bd97268

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.changeset/tidy-carpets-cheer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/explorer": patch
3+
---
4+
5+
Caching is now disabled for API routes.

packages/explorer/src/app/(explorer)/api/system-abis/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { validateChainId } from "../../../../common";
44
import { getClient } from "../utils/getClient";
55
import { getIndexerUrl } from "../utils/getIndexerUrl";
66

7-
export const dynamic = "force-dynamic";
7+
export const revalidate = 0;
88

99
export type SystemAbisResponse = {
1010
abis: {

packages/explorer/src/app/(explorer)/api/verified-worlds/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { NextResponse } from "next/server";
22
import { Pool } from "pg";
33
import { Address, getAddress } from "viem";
44

5+
export const revalidate = 0;
6+
57
export type VerifiedWorld = {
68
address: Address;
79
name: string;

packages/explorer/src/app/(explorer)/api/world-abi/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { supportedChainId, validateChainId } from "../../../../common";
99
import { getClient } from "../utils/getClient";
1010
import { getIndexerUrl } from "../utils/getIndexerUrl";
1111

12-
export const dynamic = "force-dynamic";
12+
export const revalidate = 0;
1313

1414
async function getParameters(chainId: supportedChainId, worldAddress: Address) {
1515
const client = await getClient(chainId);

0 commit comments

Comments
 (0)