activitypods / activitypods/app-boilerplate

Add caching by default

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.