Configure Caching Settings
Caching is one of the most effective ways to improve your WordPress site's performance. The Wp Admin caching engine automatically creates static HTML versions of your dynamic pages, reducing server load and dramatically improving page load times.
Configuration Panel
Access the caching configuration panel to manage all caching-related settings. The following panel represents the current state of your caching configuration.
Understanding Cache Modes
Wp Admin offers three cache modes to balance performance and dynamic content handling:
- Aggressive: Maximum performance. Caches all pages including those with dynamic widgets. Best for content-heavy sites.
- Moderate: Balanced approach. Excludes pages with certain dynamic elements while caching most content.
- Light: Minimal caching. Only caches static resources and simple pages. Best for highly dynamic applications.
Cache Preloading
When enabled, Wp Admin will automatically preload cached versions of your pages based on your sitemap and recent traffic patterns. This ensures that your cache is always warm and visitors get instant responses.
Preloading Schedule
You can configure the preloading frequency in the advanced settings:
// Wp Admin Cache Preloading Configuration define('WP_ADMIN_CACHE_PRELOAD', true); define('WP_ADMIN_PRELOAD_SCHEDULE', 'hourly'); define('WP_ADMIN_PRELOAD_PRIORITY', 'high'); // Advanced: Custom preload patterns define('WP_ADMIN_PRELOAD_PATTERNS', array( 'posts', 'pages', 'custom-post-types', '/product/*' ));
Troubleshooting
If you're experiencing issues with caching, try the following steps:
- Purge all cache: Click the "Purge All Cache" button in the configuration panel.
- Check exclusion rules: Ensure your dynamic pages are properly excluded.
- Verify file permissions: Wp Admin requires write access to the cache directory.
- Clear object cache: If using Redis or Memcached, flush the object cache.
# Clear all Wp Admin cache via CLI wp cache flush # Regenerate sitemap and preload cache wp wpadmin cache preload --sitemap # Check cache status wp wpadmin cache status
API Reference
Programmatic cache management is available via the Wp Admin REST API:
# Purge cache for a specific URL curl -X POST "https://api.wpadmin.com/v1/cache/purge" \n -H "Authorization: Bearer YOUR_API_KEY" \n -H "Content-Type: application/json" \n -d '{ "url": "https://example.com/page-to-purge", "pattern": false }' # Get cache statistics curl -X GET "https://api.wpadmin.com/v1/cache/stats" \n -H "Authorization: Bearer YOUR_API_KEY"