Skip to content

Commit

Permalink
feat: increase cache duration
Browse files Browse the repository at this point in the history
  • Loading branch information
jycssu-com committed Oct 23, 2024
1 parent 0c67b63 commit 25c8550
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/repositories/rmm.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const getBalanceOfStableRMM3 = useCacheWithLocalStorage(
}
},
{
duration: 1000 * 60 * 60, // 1 hour
duration: 1000 * 60 * 60 * 24, // 24 hours
key: 'BalanceOfStableRMM3',
usePreviousValueOnError: true,
},
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/subgraphs/queries/levinswap.queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const executeQuery = useCacheWithLocalStorage(
variables: { addressList },
}),
{
duration: 1000 * 60 * 60 * 12, // 12 hours
duration: 1000 * 60 * 60 * 24, // 24 hours
usePreviousValueOnError: true,
key: 'LevinSwapQuery',
},
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/subgraphs/queries/realtoken.queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const executeQuery = useCacheWithLocalStorage(
}
},
{
duration: 1000 * 60 * 60, // 1 hour
duration: 1000 * 60 * 60 * 24, // 24 hours
usePreviousValueOnError: true,
key: 'RealtokenQuery',
},
Expand Down
4 changes: 2 additions & 2 deletions src/repositories/subgraphs/queries/rmm.queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const executeRMM2Query = useCacheWithLocalStorage(
variables: { addressList },
}),
{
duration: 1000 * 60 * 60 * 12, // 12 hours
duration: 1000 * 60 * 60 * 24, // 24 hours
usePreviousValueOnError: true,
key: 'Rmm2Query',
},
Expand Down Expand Up @@ -80,7 +80,7 @@ const executeRMM3Query = useCacheWithLocalStorage(
}
},
{
duration: 1000 * 60 * 60, // 1 hour
duration: 1000 * 60 * 60 * 24, // 24 hours
usePreviousValueOnError: true,
key: 'Rmm3Query',
},
Expand Down
4 changes: 2 additions & 2 deletions src/repositories/subgraphs/queries/user.queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const executeGetUserIdQuery = useCacheWithLocalStorage(
return response.data.account.userIds[0].userId ?? null
},
{
duration: 1000 * 60 * 60 * 24, // 1 day
duration: 1000 * 60 * 60 * 24 * 7, // 7 days
key: 'GetUserIdQuery',
usePreviousValueOnError: true,
},
Expand All @@ -54,7 +54,7 @@ const executeGetUserDetailsQuery = useCacheWithLocalStorage(
return { id: userId, ...formatUserDetails(response.data) }
},
{
duration: 1000 * 60 * 60 * 24, // 1 day
duration: 1000 * 60 * 60 * 24 * 7, // 7 days
key: 'GetUserDetailsQuery',
usePreviousValueOnError: true,
},
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/subgraphs/queries/yam.queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const executeQuery = useCacheWithLocalStorage(
)
},
{
duration: 1000 * 60 * 60, // 1 hour
duration: 1000 * 60 * 60 * 24 * 7, // 7 days
usePreviousValueOnError: true,
key: 'YamStatisticsQuery',
},
Expand Down

0 comments on commit 25c8550

Please sign in to comment.