Cache Diagnostics
Detect plugins and themes that break your cache through live monitoring and static code analysis.
Two Detection Modes
Live Capture
Monitor your site in real-time to catch cache-busting behavior:
- Go to Cacheability Pro > Cache Diagnostics
- Click Start Capture
- Browse your site in another tab
- Return to see what was detected
Live capture detects:
- Cache-Control headers with
no-cache,no-store,private, ormax-age=0 - Set-Cookie headers on frontend pages (bypasses cache)
- PHP sessions via
session_start()(generates Set-Cookie) - Unprotected nonces in page HTML (makes pages per-user)
Code Scan
Scan active plugin and theme source code for patterns that may break caching:
- Go to Cache Diagnostics > Code Scan tab
- Click Scan Plugins & Themes
- Review findings with file locations and line numbers
The code scanner uses context-aware pattern matching to reduce false positives:
- Skips admin-only code (files in
admin/directories, settings pages) - Skips code inside
is_admin()blocks - Skips function definitions and existence checks
- Skips comments and string assignments
- Distinguishes between setting and reading headers
Actions
Each finding includes actionable buttons:
- Deactivate - Deactivate the problematic plugin directly from the diagnostics page
- Dismiss - Hide a finding if you've determined it's not an issue (site-wide, affects all admins)
Understanding Findings
| Finding Type | Severity | What It Means |
|---|---|---|
| Cache-Control Header | Critical | Plugin sends no-cache or no-store, preventing all caching |
| Set-Cookie | High | Plugin sets cookies on frontend, causing cache bypass |
| PHP Session | High | Plugin starts sessions, which set cookies |
| Nonce Output | Medium | Plugin outputs nonces in HTML, making pages per-user |
Recommendations
- For nonce issues: Enable ESI support to handle nonces at the edge
- For cookie issues: Check if the plugin needs cookies on every page, or only for logged-in users
- For session issues: Contact the plugin author - sessions on frontend are almost always unnecessary
- For header issues: Check if the plugin really needs to prevent caching, or if it's setting headers too broadly