diff --git a/src/app/(dashboard)/dashboard/cache/page.tsx b/src/app/(dashboard)/dashboard/cache/page.tsx index 24064e84..0f514543 100644 --- a/src/app/(dashboard)/dashboard/cache/page.tsx +++ b/src/app/(dashboard)/dashboard/cache/page.tsx @@ -5,6 +5,7 @@ import { Card, Button, EmptyState } from "@/shared/components"; import { useNotificationStore } from "@/store/notificationStore"; import { useTranslations } from "next-intl"; import CacheEntriesTab from "./components/CacheEntriesTab"; +import CacheStatsCard from "../settings/components/CacheStatsCard"; // ─── Types ─────────────────────────────────────────────────────────────────── @@ -371,7 +372,9 @@ export default function CachePage() {
Total Requests
-{metrics.totalRequests}
-With Cache Control
-{metrics.requestsWithCacheControl}
-Input Tokens
-- {metrics.totalInputTokens.toLocaleString()} -
-Cached Tokens (Read)
-- {metrics.totalCachedTokens.toLocaleString()} -
-Cache Creation (Write)
-- {metrics.totalCacheCreationTokens.toLocaleString()} -
-Cache Reuse Ratio
-Cached tokens / Total input tokens
-{cacheHitRate.toFixed(1)}%
-Tokens Saved
-- {metrics.tokensSaved.toLocaleString()} -
-Est. Cost Saved
-- ${metrics.estimatedCostSaved.toFixed(4)} -
-By Provider
-Loading cache metrics...
- )} + + {metrics ? ( +{t("totalRequests")}
+{metrics.totalRequests}
+{t("withCacheControl")}
++ {metrics.requestsWithCacheControl} +
+{t("inputTokens")}
++ {metrics.totalInputTokens.toLocaleString()} +
+{t("cachedTokensRead")}
++ {metrics.totalCachedTokens.toLocaleString()} +
+{t("cacheCreationWrite")}
++ {metrics.totalCacheCreationTokens.toLocaleString()} +
+{t("cacheReuseRatio")}
+{t("cacheReuseRatioDesc")}
+{cacheHitRate.toFixed(1)}%
+{t("tokensSaved")}
++ {metrics.tokensSaved.toLocaleString()} +
+{t("estCostSaved")}
++ ${metrics.estimatedCostSaved.toFixed(4)} +
+{t("byProvider")}
+{t("loading")}
+ )} +