Skip to content

Commit ccc7036

Browse files
committed
fix(insights): remove data caching & pregeneration
These features aren't scaling well as the number of price feeds grows: - The data cache doesn't seem to be reliably revalidating as expected, probably due to it being an experimental nextjs feature. Given the [new model for caching](https://nextjs.org/blog/composable-caching) that is coming in an upcoming nextjs release, I think it best to just remove the experimental caching until that lands. - The pregeneration is starting to take way too long as the number of price feeds grows drastically. I'm going to explore just turning these features off for now and see how much it impacts performance. If things feel too slow, I'll investigate other solutions
1 parent ac83809 commit ccc7036

File tree

7 files changed

+210
-339
lines changed

7 files changed

+210
-339
lines changed
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import type { Metadata } from "next";
22

3-
import { Cluster, getFeeds } from "../../../services/pyth";
43
export { PriceFeedLayout as default } from "../../../components/PriceFeed/layout";
54

65
export const metadata: Metadata = {
76
title: "Price Feeds",
87
};
9-
10-
export const generateStaticParams = async () => {
11-
const feeds = await getFeeds(Cluster.Pythnet);
12-
return feeds.map(({ symbol }) => ({ slug: encodeURIComponent(symbol) }));
13-
};
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import type { Metadata } from "next";
22

33
export { PublishersLayout as default } from "../../../components/Publisher/layout";
4-
import { getPublishers } from "../../../services/clickhouse";
54

65
export const metadata: Metadata = {
76
title: "Publishers",
87
};
9-
10-
export const generateStaticParams = async () => {
11-
const publishers = await getPublishers();
12-
return publishers.map(({ key }) => ({ key }));
13-
};

apps/insights/src/cache.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)