File tree Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Original file line number Diff line number Diff line change
1
+ import { notFound } from "next/navigation" ;
1
2
import { parse } from "superjson" ;
2
3
import { z } from "zod" ;
3
4
@@ -24,7 +25,7 @@ export const getFeed = async (params: Promise<{ slug: string }>) => {
24
25
25
26
return {
26
27
feeds,
27
- feed,
28
+ feed : feed ?? notFound ( ) ,
28
29
symbol,
29
30
} as const ;
30
31
} ;
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ export const getPublisherAverageScoreHistoryCached = redisCache.define(
22
22
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
23
23
// @ts -expect-error
24
24
getPublisherAverageScoreHistory ,
25
- ) . getPublisherAverageScoreHistory
25
+ ) . getPublisherAverageScoreHistory as typeof getPublisherAverageScoreHistory ;
26
26
27
27
export const getPublisherRankingHistoryCached = redisCache . define (
28
28
"getPublisherRankingHistory" ,
29
29
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
30
30
// @ts -expect-error
31
31
getPublisherRankingHistory ,
32
- ) . getPublisherRankingHistory
32
+ ) . getPublisherRankingHistory as typeof getPublisherRankingHistory ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
3
3
import { getPythMetadata } from './get-metadata' ;
4
4
import { Cluster , priceFeedsSchema } from "../../services/pyth" ;
5
- import { DEFAULT_CACHE_TTL , redisCache } from '../../utils/cache' ;
5
+ import { redisCache } from '../../utils/cache' ;
6
6
7
7
const _getFeeds = async ( cluster : Cluster ) => {
8
8
const unfilteredData = await getPythMetadata ( cluster ) ;
@@ -31,9 +31,6 @@ const _getFeeds = async (cluster: Cluster) => {
31
31
32
32
export const getFeedsCached = redisCache . define (
33
33
"getFeeds" ,
34
- {
35
- ttl : DEFAULT_CACHE_TTL ,
36
- } ,
37
34
_getFeeds ,
38
35
) . getFeeds ;
39
36
Original file line number Diff line number Diff line change 1
1
2
2
import { clients , Cluster } from '../../services/pyth' ;
3
- import { DEFAULT_CACHE_TTL , memoryOnlyCache } from '../../utils/cache' ;
3
+ import { memoryOnlyCache } from '../../utils/cache' ;
4
4
5
5
const _getPythMetadata = async ( cluster : Cluster ) => {
6
6
// Fetch fresh data from Pyth client
@@ -9,7 +9,6 @@ const _getPythMetadata = async (cluster: Cluster) => {
9
9
10
10
export const getPythMetadata = memoryOnlyCache . define (
11
11
"getPythMetadata" ,
12
- { ttl : DEFAULT_CACHE_TTL } ,
13
12
_getPythMetadata ,
14
13
) . getPythMetadata ;
15
14
Original file line number Diff line number Diff line change 1
1
import { getPythMetadata } from './get-metadata' ;
2
2
import { Cluster } from '../../services/pyth' ;
3
- import { DEFAULT_CACHE_TTL , redisCache } from '../../utils/cache' ;
3
+ import { redisCache } from '../../utils/cache' ;
4
4
5
5
const _computePublishers = async ( cluster : Cluster ) => {
6
6
const data = await getPythMetadata ( cluster ) ;
@@ -15,8 +15,5 @@ const _computePublishers = async (cluster: Cluster) => {
15
15
16
16
export const getPublishersForCluster = redisCache . define (
17
17
"getPublishersForCluster" ,
18
- {
19
- ttl : DEFAULT_CACHE_TTL ,
20
- } ,
21
18
_computePublishers ,
22
19
) . getPublishersForCluster ;
You can’t perform that action at this time.
0 commit comments