Page Cache
Page caching stores rendered HTML pages on disk so repeat visitors get instant page loads without hitting your database or PHP engine.
How Page Caching Works
- First visitor hits your site → WordPress renders the page normally
- Performance Toolkit saves the rendered HTML to disk
- Repeat visitor hits the same URL → cached HTML is served instantly (bypassing database queries)
- Cache expires after the configured TTL (Time To Live)
- Next visitor triggers a fresh render and cache update
This can reduce page load time from 500-2000ms down to 50-200ms, dramatically improving performance.
Enabling Page Caching
- Go to Performance Toolkit → Cache
- Check Enable page cache
- Configure settings (see below)
- Click Save changes
Configuration
Cache TTL (Time To Live)
How long cached pages are served before invalidation.
- Shorter TTL (1-6 hours) — fresher content, but more caching overhead
- Longer TTL (24+ hours) — better performance, but older content for longer
- Recommended — 3600 seconds (1 hour) for blogs; 86400 (24 hours) for mostly-static sites
Change this based on how often your content updates.
Max Cache Size (MB)
Disk space limit for cached files. When exceeded, oldest cached files are deleted.
- Recommended — 500-2000 MB depending on your disk space and site size
- Too small — cache becomes ineffective; mostly-static sites need more space
- Too large — may consume unnecessary disk space
Auto-purge on Content Update
When enabled, cached pages are automatically purged when:
- Posts/pages are published or updated
- Comments are approved
- Menus or navigation change
- Theme changes
Recommended — Always enable this to prevent serving stale content.
Cache Excluded URLs
URLs that should never be cached (one URL per line):
/wp-admin/*— admin pages (auto-excluded)/my-account/*— user dashboard/login pages/cart/*— WooCommerce cart pages/checkout/*— checkout process/?s=*— search results
Wildcards (*) are supported. Cache pagination separately if needed.
Cache Management
Viewing Cache Status
Go to Performance Toolkit → System Status to see:
- Total cached pages
- Cache size in MB
- Cache hit rate percentage
- Last purge timestamp
Manual Cache Clearing
To clear all cached files:
- Go to Performance Toolkit → Tools
- Click Clear All Cache
- Cached files are deleted; fresh pages render on next request
Scheduled Cache Purging
The plugin automatically purges cache on:
- Post/page updates — purges that URL only
- Comment approval — purges the post the comment is on
- Settings changes — purges all cache
Troubleshooting
Cache doesn't seem to be working
- Confirm it's enabled — Check Performance Toolkit → Cache, ensure checkbox is checked
- Check cache directory permissions —
wp-content/cache/performance-toolkit/must be writable - View a page twice — First load renders, second load should be instant (check browser Network tab)
- Check cache size — If at max limit, old cache is deleted
Old content is being served
- Lower the TTL — Page cache interval may be too high
- Enable auto-purge — Ensure auto-purge on content update is enabled
- Manually purge — Go to Tools and clear cache immediately
Cache is filling up disk space
- Lower max cache size setting — Smaller cache means older files are purged sooner
- Increase TTL — Longer intervals mean less cache churn
- Check excluded URLs — Make sure you're not accidentally caching too many unique URLs
Best Practices
- ✅ Enable auto-purge on content updates
- ✅ Set TTL to 1-24 hours (not too short, not too long)
- ✅ Exclude user-specific pages (account, cart, checkout)
- ✅ Monitor cache hit rate on System Status
- ✅ Test cache is working after enabling
Combining with Other Features
Page caching works best with:
- File Optimization — minify assets to speed up initial load
- Image Lazy Loading — defer image requests for faster perceived load
- CDN Integration — serve static content from edge locations
- Database Optimization — reduce time spent on cache misses
Combine all these for maximum performance improvement.