activitypods / activitypods/app-boilerplate
Add caching by default
Đang mở
- Ngôn ngữ chính
- JavaScript
- Star
- 6
- Fork
- 3
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I think for the boilerplate, it makes to add default caching, like we do for mastopod now. Most apps aren't too time-critical, I suppose. We can leave a comment in the `App.tsx` file and set a small default.
What do you think?
```tsx
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: 1 * 60 * 1000, // Consider data fresh for 1 minutes
cacheTime: 30 * 60 * 1000, // Cache unused data for 30 minutes.
retry: 3,
},
},
});
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.