Raise cache time for ReactQuery

This commit is contained in:
ajnart
2023-04-05 14:42:22 +09:00
parent 1930a4c1f6
commit 1a7ae434b7

View File

@@ -51,6 +51,8 @@ interface RssTileProps {
export const useGetRssFeeds = (feedUrls: string[], widgetId: string) => export const useGetRssFeeds = (feedUrls: string[], widgetId: string) =>
useQuery({ useQuery({
queryKey: ['rss-feeds', feedUrls], queryKey: ['rss-feeds', feedUrls],
// Cache the results for 24 hours
cacheTime: 1000 * 60 * 60 * 24,
queryFn: async () => { queryFn: async () => {
const responses = await Promise.all( const responses = await Promise.all(
feedUrls.map((feedUrl) => feedUrls.map((feedUrl) =>