refactor: update cache duration to 2 minutes

This commit is contained in:
javayhu 2025-07-13 21:43:15 +08:00
parent 4277970074
commit 5e877bf45e
2 changed files with 4 additions and 3 deletions

View File

@ -3,8 +3,8 @@ import { getCreditBalanceAction } from '@/actions/get-credit-balance';
import type { Session } from '@/lib/auth-types';
import { create } from 'zustand';
// Cache duration: 30 seconds
const CACHE_DURATION = 30 * 1000;
// Cache duration: 2 minutes (optimized for better UX)
const CACHE_DURATION = 2 * 60 * 1000;
/**
* Credits state interface

View File

@ -5,7 +5,8 @@ import { getAllPricePlans } from '@/lib/price-plan';
import type { PricePlan, Subscription } from '@/payment/types';
import { create } from 'zustand';
const CACHE_DURATION = 30 * 1000;
// Cache duration: 2 minutes (optimized for better UX)
const CACHE_DURATION = 2 * 60 * 1000;
/**
* Payment state interface