mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
Add staleTime and gcTime to useUsageQuery to avoid triggering unnecessary API calls when switching between app tabs. The staleTime is set dynamically based on the auto-refresh interval (or 5 minutes by default), and gcTime is set to 10 minutes to preserve cache after component unmount.