Changeset 3435693
- Timestamp:
- 01/09/2026 07:55:12 AM (3 months ago)
- File:
-
- 1 edited
-
varycache/trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
varycache/trunk/readme.txt
r3435687 r3435693 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Advanced variant-based caching system for A/B testing, geo-targeting, and query parameter variations. Serve different cached versions of pages.11 Advanced caching plugin with A/B testing, geo-targeting, query parameter variations, and speed optimizations. Serve different cached versions of pages. 12 12 13 13 == Description == 14 14 15 VaryCache is a powerful caching plugin that allows you to serve different versions of cached pages based on various conditions: 16 17 = Key Features = 18 19 * **A/B Testing** - Create multiple A/B tests with weighted variants 20 * **Geo Targeting** - Serve different content based on visitor's country 21 * **Query Parameters** - Cache variations based on URL parameters (UTM, etc.) 22 * **REST API Caching** - Cache REST API responses for improved performance 23 * **Cache Preload** - Automatic and manual cache warming from sitemap 24 * **Browser Cache Headers** - Cache-Control, Expires, Last-Modified headers 25 * **Link Prefetch/Prerender** - Instant page navigation on hover (Speculation Rules API) 26 * **Speed Optimizations** - HTML minification, DNS prefetch, preload hints 27 * **Disable Emoji** - Remove WordPress emoji scripts to save bandwidth 28 * **Remove Query Strings** - Remove ?ver= from static resources 15 VaryCache is a powerful WordPress caching plugin that combines page caching with content personalization. Serve different cached versions of your pages based on A/B tests, visitor location, or URL parameters — all while maintaining excellent performance. 16 17 = Core Caching = 18 19 * **Page Cache** - File-based caching for fast page delivery without database overhead 20 * **REST API Cache** - Cache REST API responses to reduce server load 21 * **Cache Preload** - Automatic cache warming from sitemap 22 * **Browser Cache Headers** - Cache-Control, Expires, Last-Modified, Vary headers 23 24 = Content Personalization = 25 26 * **A/B Testing** - Create multiple tests with weighted variants (50/50, 70/30, etc.) 27 * **Geo Targeting** - Show different content based on visitor's country 28 * **Query Parameters** - Cache variations based on UTM tags and other URL parameters 29 30 = Speed Optimizations = 31 32 * **HTML Minification** - Remove whitespace to reduce page size 33 * **DNS Prefetch** - Pre-resolve external domains for faster loading 34 * **Preload Resources** - Preload fonts, CSS, and hero images for better LCP 35 * **Link Prefetch** - Preload pages on hover for instant navigation 36 * **Disable Emoji** - Remove WordPress emoji scripts (~15KB savings) 37 * **Remove Query Strings** - Better CDN caching for static resources 29 38 * **Image Dimensions** - Auto-add missing width/height to prevent CLS 30 * **File-based Caching** - Fast, lightweight caching without database overhead 39 40 = Developer Features = 41 42 * **Shortcodes** - Easy content switching in posts and pages 43 * **PHP Functions** - Helper functions for theme developers 44 * **Debug Panel** - Visual debugging panel on frontend 31 45 * **CDN Compatible** - Works with CloudFront, Cloudflare, and other CDNs 32 * **WP Rocket Integration** - Seamlessly integrates with WP Rocket caching 33 * **Debug Panel** - Visual debugging panel for testing 34 * **Shortcodes** - Easy content switching with shortcodes 35 * **PHP Functions** - Helper functions for theme developers 46 * **WP Rocket Integration** - Compatible with WP Rocket caching 36 47 * **Multisite Support** - Full multisite compatibility 37 38 = Use Cases =39 40 * Run A/B tests on landing pages41 * Show different pricing based on user's country42 * Personalize content for different traffic sources (UTM parameters)43 * Test different headlines, CTAs, or layouts44 * Serve localized content based on geo location45 46 = How It Works =47 48 1. Configure your tests, geo rules, or query parameters in the admin panel49 2. Add shortcodes to your pages or use PHP functions in your theme50 3. The plugin creates separate cached versions for each variant51 4. Visitors are automatically assigned variants based on your rules52 48 53 49 = Shortcodes = … … 60 56 = PHP Functions = 61 57 62 `if ( varycache_is_variant( 'A' ) ) { 58 `// A/B Testing 59 if ( varycache_is_variant( 'A' ) ) { 63 60 // Show variant A content 64 }` 65 66 `if ( varycache_is_geo( 'US' ) ) { 61 } 62 $variant = varycache_get_variant(); // Returns 'A', 'B', etc. 63 64 // Geo Targeting 65 if ( varycache_is_geo( 'US' ) ) { 67 66 // Show US-specific content 68 }` 67 } 68 $country = varycache_get_geo(); // Returns 'US', 'RU', etc.` 69 69 70 70 = Page Patterns = 71 71 72 72 Flexible page matching with wildcards and regex: 73 73 74 * `/` - Homepage only 74 * `/blog/*` - Single segment wildcard 75 * `/blog/**` - Any depth wildcard 76 * `~^/post/\d+$` - Regular expression 75 * `/pricing` - Exact page match 76 * `/blog/*` - Single level wildcard 77 * `/shop/**` - Any depth wildcard 78 * `~^/post/\d+$` - Regular expression (prefix with ~) 77 79 78 80 = Requirements = … … 88 90 3. Go to Settings > VaryCache to configure 89 91 90 = Basic Setup = 91 92 1. Enable caching in the settings 93 2. Create an A/B test or enable geo targeting 94 3. Add pages where you want variant caching 95 4. Use shortcodes in your content to show different versions 96 97 = WP Rocket Integration = 98 99 If using WP Rocket, exclude pages with variant caching from WP Rocket's cache: 92 = Quick Start = 93 94 1. Enable caching in the plugin settings 95 2. Configure Page Cache to cache all pages or specific URLs 96 3. Optionally set up A/B tests, geo targeting, or query parameters 97 4. Use shortcodes in your content to show different versions to different visitors 98 99 = Using with Other Cache Plugins = 100 101 If using WP Rocket or another caching plugin, exclude pages with variant caching: 102 100 103 1. Go to WP Rocket > Advanced Rules 101 2. Add your test pages to "Never Cache URLs" 104 2. Add your A/B test pages to "Never Cache URLs" 105 106 VaryCache will handle caching for those pages with variant support. 102 107 103 108 == Frequently Asked Questions == 104 109 105 = Does this work with page builders? = 106 107 Yes! The shortcodes work with any page builder including Elementor, Gutenberg, Divi, and others. 108 109 = How are visitors assigned to variants? = 110 111 For A/B tests, visitors are randomly assigned based on configured weights and stored in a cookie. For geo targeting, the country is detected from HTTP headers (CloudFront-Viewer-Country, CF-IPCountry). 112 113 = Does this affect SEO? = 114 115 No. Search engines see the default variant and the canonical URL remains the same. 116 117 = Can I run multiple A/B tests? = 118 119 Yes! You can create multiple independent A/B tests with different pages and variants. 120 121 = How long are variants cached? = 122 123 You can configure the cache TTL (time to live) in settings. Default is 1 hour. 124 125 = Does this work with CDNs? = 126 127 Yes, but you need to configure your CDN to pass through cookies and country headers. 110 = What makes VaryCache different from other caching plugins? = 111 112 VaryCache combines page caching with content personalization. Unlike traditional caching plugins that serve the same cached page to everyone, VaryCache can serve different cached versions based on A/B tests, visitor location, or URL parameters. 113 114 = Can I use VaryCache just for page caching without A/B testing? = 115 116 Yes! You can use VaryCache purely as a page cache. Enable "General Page Cache" in the Page Cache tab and configure which pages to cache. A/B testing, geo targeting, and query parameters are optional features. 117 118 = How does geo targeting detect the visitor's country? = 119 120 VaryCache reads country information from HTTP headers provided by CDNs: 121 - CloudFront: `CloudFront-Viewer-Country` 122 - Cloudflare: `CF-IPCountry` 123 - Custom: You can configure your own header name 124 125 If no header is detected, the country code will be "XX". 126 127 = Does this work with page builders like Elementor? = 128 129 Yes! The shortcodes work with any page builder including Elementor, Gutenberg, Divi, WPBakery, and others. Simply add the shortcode blocks where needed. 130 131 = How are visitors assigned to A/B test variants? = 132 133 Visitors are randomly assigned based on the weights you configure (e.g., 50% variant A, 50% variant B). The assignment is stored in a cookie so they see the same variant on subsequent visits. 134 135 = Does A/B testing affect SEO? = 136 137 No. Search engine bots see the default variant, and the canonical URL remains unchanged. This is the recommended approach per Google's guidelines for A/B testing. 138 139 = What are the speed optimization features? = 140 141 VaryCache includes several Core Web Vitals optimizations: 142 - **HTML Minification** - Reduces page size by removing whitespace 143 - **DNS Prefetch** - Pre-resolves external domains (Google Fonts, Analytics, etc.) 144 - **Preload Resources** - Preloads critical fonts, CSS, and hero images (improves LCP) 145 - **Disable Emoji** - Removes WordPress emoji scripts (~15KB savings) 146 - **Image Dimensions** - Adds missing width/height to prevent layout shifts (CLS) 147 - **Link Prefetch** - Preloads pages when user hovers over links 148 149 = How does REST API caching work? = 150 151 You can configure specific REST API endpoints to be cached (e.g., `/wp/v2/posts`). Cached responses are served directly without executing PHP, significantly reducing server load for API-heavy sites. 152 153 = Where are cache files stored? = 154 155 Cache files are stored in `wp-content/cache/varycache/`. Settings are stored in `wp-content/uploads/varycache/settings.json`. Both locations are WordPress-compliant. 156 157 = Can I clear the cache programmatically? = 158 159 Yes, use `VaryCache_Cache::clear_cache()` in your code. The cache is also automatically cleared when posts are saved or deleted. 160 161 = Does VaryCache work with CDNs? = 162 163 Yes, but for A/B testing and geo targeting to work correctly, configure your CDN to: 164 - Pass through cookies (for A/B test variant assignment) 165 - Forward country headers (for geo targeting) 128 166 129 167 == Screenshots == 130 168 131 1. A/B Tests configuration 132 2. Geo targeting settings 133 3. Query parameters configuration 134 4. Cache report 135 5. Debug panel on frontend 169 1. VaryCache admin panel - flexible caching plugin for dynamic content 136 170 137 171 == Changelog == 138 172 139 173 = 1.2.0 = 140 * NEW: Speed optimization tab with performancefeatures174 * NEW: Speed optimization tab with Core Web Vitals features 141 175 * NEW: HTML Minification - reduce page size by removing whitespace 142 176 * NEW: DNS Prefetch - pre-resolve external domains for faster loading … … 178 212 179 213 = 1.2.0 = 180 New Speed tab with Core Web Vitals optimizations: HTML minification, DNS prefetch, preload hints, disable emoji, image dimensions. Highly recommended .214 New Speed tab with Core Web Vitals optimizations: HTML minification, DNS prefetch, preload hints, disable emoji, image dimensions. Highly recommended update for better performance. 181 215 182 216 = 1.1.0 = … … 185 219 = 1.0.0 = 186 220 Initial release. 187
Note: See TracChangeset
for help on using the changeset viewer.