Skip to content

Commit 1e45f00

Browse files
committed
set remote config cache duration
1 parent d691ced commit 1e45f00

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/features/remoteConfig/providers/ConfigurationWrapper.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ import { useGetRemoteConfig } from '../api/getRemoteConfig'
44
import BeatLoader from 'react-spinners/BeatLoader'
55

66
export const ConfigurationWrapper = (props) => {
7-
const { isLoading, isError, data: remoteConfig } = useGetRemoteConfig()
7+
const {
8+
isLoading,
9+
isError,
10+
data: remoteConfig,
11+
} = useGetRemoteConfig({
12+
config: {
13+
staleTime: 3600000, //1 Hour
14+
cacheTime: 86400000, // 1 Day
15+
},
16+
})
817
const throwError = useAsyncError()
918

1019
if (isLoading) {

0 commit comments

Comments
 (0)