Skip to content

Data, caching, and refresh

How the dashboard stores and refreshes data

Enterprise dashboard store

  • The dashboard uses a global store (e.g. Zustand) that holds:

    • Current preset (e.g. 7d, 30d, 90d, 1y) and optional custom date range.

    • Unified data: chart_data, KPIs (published_content, user_engagement, user_registrations), metadata (period, total_days, cache expiry, last_updated).

    • Cache per preset (and optionally per custom range) with TTL (e.g. 5 min for 7d, 15 min for 30d, 30 min for 90d, 1 hour for 1y).

  • Presets define: number of days, period (daily/weekly/monthly), cache TTL, and priority. This allows preloading and fast switching.

Preload

  • On init, the dashboard can preload data for presets (e.g. 7d, 30d, 90d, 1y) in the background so that when you switch preset or date range, data is already in memory or cache.

  • Preload is triggered by initializeDashboardPreload() and configured in the useEnterpriseDashboard hook (e.g. enableAutoPreload, preloadPresets).

Clear Cache (summary)

When you click Clear Cache:

  1. Dashboard-related keys in localStorage and sessionStorage are removed.

  2. The enterprise store cache is cleared (clearAllCache).

  3. Any optimized data cache for the dashboard is cleared.

  4. Pending posts cache is invalidated (invalidatePendingPostsCache).

  5. React Query is invalidated for posts and post-stats.

  6. Date range is reset to the last 30 days and saved to session storage.

  7. Optionally, a backend cache-clear endpoint is called (e.g. /wp-json/fleekdash/v1/cache/clear-transients).

  8. A full refresh of dashboard data is triggered and custom events (fleekdash:force-refresh-all-data, fleekdash:force-refresh-unified-dashboard) are dispatched so widgets reload.

One action to get a clean slate and up-to-date numbers after big changes or if something looks wrong.

<!-- seo-geo: content-enrichment -->

In practice

Enterprise dashboard store, preload, presets, and what Clear Cache does. On this page, How the dashboard stores and refreshes data is covered in detail: what it looks like in the admin, the exact controls it exposes, and how it behaves when you use it day to day. The sections above walk through Enterprise dashboard store, Preload, Clear Cache (summary) in order, so you can skim headings and jump straight to the part you need. Because how the dashboard stores and refreshes data is part of Dashboard — the FleekDash home base — stats cards, a growth chart, and a pending-approval queue in one view — the settings you touch here interact with the rest of the feature; when in doubt, open the feature overview and follow the docs in order.

See also

Need a hand? Contact support or head back to the Dashboard guide.