Page Cache Overview
Basic Cache Configuration
Cache Mode (Auto / LiteSpeed / File)
- Auto: detect LiteSpeed and use LSCache; otherwise use file cache.
- LiteSpeed: force LiteSpeed cache only (no file cache).
- File: force ZiziCache file-based cache only.
Enable Page Cache
- Navigate to ZiziCache > Cache
- Check the „Enable page cache“ option
- Enable „Cache preloading (Preload)“*option
- Click „Save cache settings“
Cache Lifetime Settings
- 0 hours: disables page cache.
- 1+ hours: cached files expire after the given number of hours.
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
Separate Mobile Cache
-mobile). Tablets are treated as desktop by default (filter: zizi_cache_tablet_is_mobile).Cache 404 Page
404.html.gz (and 404-mobile.html.gz when mobile cache is enabled) to reduce bot load.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
// Override SQLite expired-cache worker batch size/interval
define('ZIZI_PRELOAD_BATCH', 20);
define('ZIZI_PRELOAD_INTERVAL', 30); // seconds
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
woocommerce_cart_hash
woocommerce_items_in_cart
wp_woocommerce_session_
woocommerce_recently_viewed
wordpress_logged_in_*
comment_author_*
Built-in Bypass Conditions (always active)
- Non‑GET/HEAD requests (POST, PUT, DELETE, etc.)
- REST API requests (
/wp-json/) - WP‑CLI context
- Page builder/editor query parameters (Elementor, Bricks, Divi, etc.)
- Debug/query bypass params:
nocache,bypass_optimization,zizi_bypass,cache_bust - Preload requests (
X-Zizi-Preload/X-Zizi-Warmed)
Query Parameter Handling
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 preload-cache
wp zizi-cache purge-pages
wp zizi-cache purge-pages-and-preload
wp zizi-cache purge-everything
wp zizi-cache purge-everything-and-preload
„`
purge-pages clears the entire HTML page cache (not a single URL).Automatic Cache Clearing
Content Update Triggers
Cache automatically clears when:
- Posts/pages are published or updated (published content only)
- Scheduled posts are published
- Comment count changes (new/approved/deleted comments)
- Selected ZiziCache settings are saved (e.g., image/iframe settings) and trigger a purge
Smart Cache Invalidation
ZiziCache determines which URLs to refresh:
- Post URL and homepage
- Posts page (blog index)
- Post type archive
- Author archive
- Taxonomy archives (terms + parent terms)
Advanced Feature: The system collects affected URLs and processes them in batches to reduce server load.
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]: Served from valid cache file
- MISS [X]: Page generated dynamically
- BYPASS [BYPASS]: Cache intentionally skipped (reason tag may appear)
- PRELOAD [WARMED]: Cache generated by preload system
- MANUAL [CACHED]: Cache created by manual action
- EXPIRED [EX]: Stale cache served while refresh is queued
x-zizi-cache-source is set to PHP on misses; for cache hits rely on x-zizi-cache-cache.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 cache control headers such as:
„`
Cache-Tag: [hostname]
CDN-Cache-Control: max-age=2592000
Cache-Control: public, max-age=31536000
Content-Encoding: gzip
X-ZiziCache-Version: [plugin version]
X-ZiziCache-Served: [GMT timestamp]
Last-Modified: [cache file timestamp]
„`
304 Not Modified responses when If-Modified-Since matches the cache file timestamp.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.