Page Cache Overview
Basic Cache Configuration
Enable Page Cache
- 1. Navigate to ZiziCache > Cache
- 2. Check the “Enable page cache” option
- 3. Enable “Cache preloading (Preload)”*option
- 4. Click “Save cache settings”
Cache Lifetime Settings
Advanced Cache Options
Logged-in User Caching
- Disabled (default): Logged-in users always see fresh content
- Enabled: Cache personalized content with user-specific cache files
- Use case: Suitable for membership sites with static member content
Advanced Cache Preloading System
Batch Processing Preloader
- Batch size: Processes URLs in configurable batches (default: 5 URLs per batch)
- Background processing: Uses WordPress cron system for non-blocking cache generation
- Queue management: Maintains intelligent URL queue with duplicate prevention
- Server protection: Prevents overload during large cache regeneration
SQLite-Based Cache Management
- Coordination database: Uses SQLite for managing expired cache regeneration
- Asynchronous refresh: Handles background cache updates without blocking requests
- Smart queuing: Prevents duplicate refresh requests for the same URL
Setting config in wp-config.php:
// === WARMER PERFORMANCE ===
define('ZIZI_CACHE_PRELOAD_BATCH_SIZE', 5); // Conservative setting for weaker servers
define('ZIZI_CACHE_PRELOAD_TIMEOUT', 30);
define('ZIZI_CACHE_BATCH_INTERVAL', 2); // 2 seconds between batches// === WARMER PERFORMANCE Slow shared hosting or VPS ===// === WARMER PERFORMANCE better shared hosting or VPS ===// === WARMER PERFORMANCE best VPS od dedicated server ===define('ZIZI_CACHE_PRELOAD_BATCH_SIZE', 20);define(‘ZIZI_CACHE_LIFETIME’, 12); // Shorter lifetime, more frequent refreshdefine(‘ZIZI_CACHE_STALE_GRACE_PERIOD’, 600); // 10 minutes grace period
Preload Benefits
- Immediate cache: Ensures first visitors get cached content
- Zero downtime: Stale-while-revalidate pattern maintains site speed
- Automatic warming: Content updates trigger immediate cache regeneration
Bypass Cookies
Cache File Management
Cache Storage Location
Advanced Cache File Naming Convention
Multi-dimensional Cache Variants:
Example cache file names:
Manual Cache Management
- Clear All Cache: Removes all cached files
- Clear Page Cache: Removes current page cache only
- Preload Cache: Regenerates cache for all pages
WP-CLI Commands:
“`bash
wp zizi-cache purge-everything
wp zizi-cache purge-pages
wp zizi-cache preload-cache
wp zizi-cache purge-everything-and-preload
“`
Automatic Cache Clearing
Content Update Triggers
Cache automatically clears when:
- Posts or pages are published, updated, or deleted
- Comments are approved or deleted
- Menus are modified
- Theme customizations are saved
- Plugin settings are updated
- Scheduled posts are published
Smart Cache Invalidation
ZiziCache intelligently determines which cache files to clear:
- Related pages: Category pages when posts are updated
- Archive pages: Date archives when content changes
- Homepage: When featured content is modified
- Tag pages: When tagged content is updated
- Author pages: When author posts change
Advanced Feature: The system collects all affected URLs and processes them in batches to prevent server overload during large content updates.
Performance Monitoring
Enhanced Cache Status Headers
ZiziCache provides detailed cache status information through HTTP headers:
“`
x-zizi-cache-cache: [STATUS] [CODE]
x-zizi-cache-source: [SOURCE]
“`
Complete Status Types:
- HIT [OK]: Page served from valid cache
- MISS [X]: Page generated dynamically
- BYPASS [BYPASS]: Page excluded from caching
WARMED [W]: Page pre-generated by preload system- EXPIRED [EX]: Stale cache served while revalidating in background
Source Indicators:
- PHP: Generated by PHP/WordPress
- CACHE: Served from static cache file
- SQLITE: Managed by SQLite coordination system
Cache Hit Rate Monitoring
Monitor cache effectiveness through:
- Browser Developer Tools: Check Network tab for cache headers
- Server Response Headers: Look for `x-zizi-cache-cache` values
- Performance Metrics: Monitor page load time improvements
- Log Analysis: Review ZiziCache log files for cache statistics
Advanced Cache Headers
ZiziCache adds sophisticated cache control headers:
“`
Cache-Tag: [hostname]
CDN-Cache-Control: max-age=2592000
Cache-Control: no-cache, must-revalidate
Content-Encoding: gzip
“`
Troubleshooting Cache Issues
Common Problems and Solutions
Pages Not Caching
Causes:
- URL matches bypass rules
- Bypass cookies present
- User logged in with disabled logged-in caching
- POST request instead of GET
- Content not HTML
Solutions:
- Review exclusion rules in Advanced settings
- Check for bypass cookies
- Verify request method
- Test with anonymous user
Stale Content Issues
Causes:
- Automatic cache clearing disabled
- Cache lifetime too long
- Content updates not triggering cache clear
Solutions:
- Verify automatic cache clearing settings
- Manually clear specific page cache
- Check content update hooks
Storage and Permission Issues
Causes:
- Insufficient disk space
- Wrong file permissions
- Cache directory not writable
Solutions:
- Monitor `/wp-content/cache/zizi-cache/` storage
- Set cache directory permissions to 755
- Ensure WordPress can write to cache directory
Debug Cache Behavior
Enable comprehensive debugging:
- Cache Headers: Check browser developer tools for cache status
- Log Files: Review `/wp-content/plugins/zizi-cache/zizi-log.log`
- User Role Testing: Test with different user roles and permissions
- Device Testing: Verify mobile and desktop cache variants
- Security Files: Ensure `.htaccess` files exist in cache directories
Advanced Debugging
SQLite Database Inspection:
The cache coordination database is located at:
“`
/wp-content/cache/zizi-cache/preload.sqlite
“`
Queue File Monitoring:
The preload queue is maintained in:
“`
/wp-content/cache/zizi-cache/preloader-list.txt
“`
Best Practices
Optimal Configuration Strategy
- Start Conservative: Begin with basic settings and gradually optimize
- Test Incrementally: Verify functionality after enabling each feature
- Monitor Performance: Use tools like GTmetrix or Google PageSpeed Insights
- Regular Maintenance: Periodically clear cache and monitor storage usage
E-commerce Specific Considerations
Essential Exclusions
“`
/checkout/
/cart/
/my-account/
/?add-to-cart=*
/?wc-ajax=*
“`
Cookie-based Exclusions
“`
woocommerce_cart_hash
woocommerce_items_in_cart
wp_woocommerce_session_*
“`
Multi-currency Support
- Enable currency-based cache variations
- Configure appropriate currency plugins (Aelia, YITH, WCML)
- Test cache variants for different currencies
Multilingual Site Configuration
Supported Plugins
- Polylang: Automatic language-based cache variants
- WPML: Currency and language cache variations
- TranslatePress: Language-specific cache files
Best Practices
- Enable language-based cache variants
- Test cache files for all languages
- Monitor cache storage for multiple language variants
Performance Optimization Tips
- Cache Preloading: Always enable for better first-visit performance
- Batch Size: Adjust preload batch size based on server capacity
- Cache Lifetime: Balance between freshness and performance
- Exclusion Rules: Be specific to avoid over-exclusion
- Monitoring: Regularly check cache hit rates and performance metrics
Advanced Configuration Examples
High-Traffic Website
“`
Cache Lifetime: 24 hours
Preload: Enabled (batch size: 10)
Logged-in Caching: Enabled
Cache Variants: Language + Currency
Exclusion Rules: Minimal, specific only
“`
E-commerce Store
“`
Cache Lifetime: 6 hours
Preload: Enabled (batch size: 5)
Logged-in Caching: Disabled
Cache Variants: Currency + Language
Exclusion Rules: All checkout/cart pages
Bypass Cookies: All WooCommerce session cookies
“`
Membership Site
“`
Cache Lifetime: 12 hours
Preload: Enabled (batch size: 3)
Logged-in Caching: Enabled
Cache Variants: User Role + Language
Exclusion Rules: Member-specific content
Role-based Variants: All user roles
“`
Conclusion
Proper page cache configuration is essential for optimal website performance. ZiziCache’s advanced caching system with SQLite coordination, stale-while-revalidate patterns, and intelligent cache warming provides enterprise-level performance optimization.
Start with basic settings and gradually implement advanced features based on your specific requirements. Always test thoroughly and monitor performance metrics to ensure optimal configuration for your content management workflow.
The sophisticated cache management system ensures zero downtime during cache regeneration while maintaining fresh content delivery, making it suitable for high-traffic websites, e-commerce stores, and complex multilingual sites.