Detailed Metrics

MilliCache always tracks its cache hit ratio. The Detailed Metrics module goes further: it charts requests, bandwidth, and response times on the Status dashboard, so you can see exactly what the cache saves you and how it trends over time.

Enable it under Settings → MilliCache → Modules → Detailed Metrics (in the Insights group).

The Insights Dashboard#Copied!

With the module active, the Status tab gains a full analytics view:

  • Right now: live KPI cards, including storage memory usage
  • KPI cards: Requests, Hit ratio, and Visitor time saved for the selected period, each with a sparkline and a comparison against the previous period of equal length
  • Breakdown charts: Requests, Bandwidth, and Hit ratio over time, plus a Response time chart comparing cached against uncached delivery (with a "~N× faster" summary)
  • Date range picker: switch between hourly and daily granularity, pick a custom range, or use presets (Today, Last 14 days, Last 30 days, and the last 12 calendar months)

The view refreshes automatically every minute. Your granularity, date range, and site selection are remembered per browser.

On multisite, the Network Admin dashboard adds a site picker: view the whole network aggregated, a single site, or any subset of sites. Each site's own dashboard shows its own numbers.

What Is Recorded#Copied!

Metric Recorded Notes
Hits and misses Always Powers the hit ratio, even without this module
Bytes served (hit/miss) Module active Powers the bandwidth breakdown
Serve and generation time Module active Powers the response-time comparison
Stale serves Module active Pages served from grace while regenerating

Data is stored in your cache storage server in hourly buckets; a nightly job rolls completed days up into daily buckets and prunes anything past retention. Recording is best-effort by design: it never adds a failure mode to serving pages. Internal requests (such as preloading) are excluded, so the numbers reflect real visitors.

Note: The detailed fields (bandwidth, timings, stale serves) only exist from the moment you enable the module. Time ranges before that show hits and misses only.

Settings#Copied!

Setting Default Description
Keep hourly data 60 days How far back you can zoom into per-hour detail on the dashboard. Hourly counters are the bulk of what metrics keep in storage.
Keep daily data 730 days How long the per-day totals behind long-term trends are kept. Daily counters are tiny; a year costs roughly 2,500 small fields per site.

Both accept days, weeks, months, or years. The date picker automatically limits itself to the retained window.

On multisite, Detailed Metrics is configured in the Network Admin: one toggle and one retention policy for the whole network. Subsites see their dashboards but do not configure recording individually.

WP-CLI#Copied!

Command Description
wp millicache metrics seed Fill the metrics history with plausible sample data
wp millicache metrics clear Delete all recorded metrics for the current site

seed options:

Option Description
--days=<days> How many days of daily history to generate (max 365, default 7)
--clear Wipe existing metrics before seeding

Examples:

 1# Seed a week of sample metrics
 2wp millicache metrics seed
 3
 4# Reseed a year from scratch
 5wp millicache metrics seed --days=365 --clear
 6
 7# Start over with real data only
 8wp millicache metrics clear

Seeding is handy on staging or fresh installs when you want to see the dashboard populated before real traffic arrives. On multisite, seed individual sites with the global --url=<site-url> flag to populate the network dashboard.

Notes#Copied!

  • Metrics buckets are stored in UTC; the dashboard renders them in your site's timezone and date format.
  • Dashboard responses are cached for one minute, so freshly recorded traffic can lag up to a minute behind.
  • A valid license is required: the dashboard's detail endpoint and the extended recording are Pro features. Basic hit/miss tracking works without a license.

Next Steps#Copied!

Last updated: