{"id":271606,"date":"2026-01-09T07:46:25","date_gmt":"2026-01-09T07:46:25","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/dynamic-cache\/"},"modified":"2026-01-10T12:09:05","modified_gmt":"2026-01-10T12:09:05","slug":"varycache","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/varycache\/","author":23430715,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.3","stable_tag":"1.2.3","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"VaryCache","header_author":"kap186","header_description":"Advanced variant-based caching system for A\/B testing, geo-targeting, and query parameter variations. Serve different cached versions of pages based on cookies, HTTP headers, or URL parameters.","assets_banners_color":"5c5d83","last_updated":"2026-01-10 12:09:05","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/kap186.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":201,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.2.0":{"tag":"1.2.0","author":"gkap186","date":"2026-01-09 07:46:57"},"1.2.1":{"tag":"1.2.1","author":"gkap186","date":"2026-01-09 08:57:12"},"1.2.2":{"tag":"1.2.2","author":"gkap186","date":"2026-01-10 07:10:42"},"1.2.3":{"tag":"1.2.3","author":"gkap186","date":"2026-01-10 12:09:05"}},"upgrade_notice":{"1.2.3":"<p>New Gzip Compression feature reduces page size by ~70%. Enable in Speed tab for immediate performance boost.<\/p>","1.2.0":"<p>New Speed tab with Core Web Vitals optimizations: HTML minification, DNS prefetch, preload hints, disable emoji, image dimensions. Highly recommended update for better performance.<\/p>","1.1.0":"<p>New features: REST API caching, Cache Preload, Browser Cache Headers. Recommended update.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3435687,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3435687,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3435687,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3435687,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2.0","1.2.1","1.2.2","1.2.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3435687,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"VaryCache admin panel - flexible caching plugin for dynamic content"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1588,146,4896,247,10685],"plugin_category":[52,54],"plugin_contributors":[253631],"plugin_business_model":[],"class_list":["post-271606","plugin","type-plugin","status-publish","hentry","plugin_tags-a-b-testing","plugin_tags-cache","plugin_tags-geo-targeting","plugin_tags-performance","plugin_tags-personalization","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_contributors-gkap186","plugin_committers-gkap186"],"banners":{"banner":"https:\/\/ps.w.org\/varycache\/assets\/banner-772x250.png?rev=3435687","banner_2x":"https:\/\/ps.w.org\/varycache\/assets\/banner-1544x500.png?rev=3435687","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/varycache\/assets\/icon-128x128.png?rev=3435687","icon_2x":"https:\/\/ps.w.org\/varycache\/assets\/icon-256x256.png?rev=3435687","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/varycache\/assets\/screenshot-1.png?rev=3435687","caption":"VaryCache admin panel - flexible caching plugin for dynamic content"}],"raw_content":"<!--section=description-->\n<p>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 \u2014 all while maintaining excellent performance.<\/p>\n\n<h4>Core Caching<\/h4>\n\n<ul>\n<li><strong>Page Cache<\/strong> - File-based caching for fast page delivery without database overhead<\/li>\n<li><strong>REST API Cache<\/strong> - Cache REST API responses to reduce server load<\/li>\n<li><strong>Cache Preload<\/strong> - Automatic cache warming from sitemap<\/li>\n<li><strong>Browser Cache Headers<\/strong> - Cache-Control, Expires, Last-Modified, Vary headers<\/li>\n<\/ul>\n\n<h4>Content Personalization<\/h4>\n\n<ul>\n<li><strong>A\/B Testing<\/strong> - Create multiple tests with weighted variants (50\/50, 70\/30, etc.)<\/li>\n<li><strong>Geo Targeting<\/strong> - Show different content based on visitor's country<\/li>\n<li><strong>Query Parameters<\/strong> - Cache variations based on UTM tags and other URL parameters<\/li>\n<\/ul>\n\n<h4>Speed Optimizations<\/h4>\n\n<ul>\n<li><strong>HTML Minification<\/strong> - Remove whitespace to reduce page size<\/li>\n<li><strong>DNS Prefetch<\/strong> - Pre-resolve external domains for faster loading<\/li>\n<li><strong>Preload Resources<\/strong> - Preload fonts, CSS, and hero images for better LCP<\/li>\n<li><strong>Link Prefetch<\/strong> - Preload pages on hover for instant navigation<\/li>\n<li><strong>Disable Emoji<\/strong> - Remove WordPress emoji scripts (~15KB savings)<\/li>\n<li><strong>Remove Query Strings<\/strong> - Better CDN caching for static resources<\/li>\n<li><strong>Image Dimensions<\/strong> - Auto-add missing width\/height to prevent CLS<\/li>\n<li><strong>Gzip Compression<\/strong> - Compress HTML output to reduce page size by ~70%<\/li>\n<\/ul>\n\n<h4>Developer Features<\/h4>\n\n<ul>\n<li><strong>Shortcodes<\/strong> - Easy content switching in posts and pages<\/li>\n<li><strong>PHP Functions<\/strong> - Helper functions for theme developers<\/li>\n<li><strong>Debug Panel<\/strong> - Visual debugging panel on frontend<\/li>\n<li><strong>CDN Compatible<\/strong> - Works with CloudFront, Cloudflare, and other CDNs<\/li>\n<li><strong>Translation Ready<\/strong> - Includes Russian translation<\/li>\n<\/ul>\n\n<h4>Shortcodes<\/h4>\n\n<pre><code>[varycache_ab v=\"A\"]Content for variant A[\/varycache_ab]\n[varycache_ab v=\"B\"]Content for variant B[\/varycache_ab]\n[varycache_ab test=\"pricing\" v=\"X\"]Content for specific test[\/varycache_ab]\n[varycache_geo country=\"US\"]Content for US visitors[\/varycache_geo]\n<\/code><\/pre>\n\n<h4>PHP Functions<\/h4>\n\n<pre><code>\/\/ A\/B Testing\nif ( varycache_is_variant( 'A' ) ) {\n    \/\/ Show variant A content\n}\n$variant = varycache_get_variant(); \/\/ Returns 'A', 'B', etc.\n\n\/\/ Geo Targeting\nif ( varycache_is_geo( 'US' ) ) {\n    \/\/ Show US-specific content\n}\n$country = varycache_get_geo(); \/\/ Returns 'US', 'RU', etc.\n<\/code><\/pre>\n\n<h4>Page Patterns<\/h4>\n\n<p>Flexible page matching with wildcards and regex:<\/p>\n\n<ul>\n<li><code>\/<\/code> - Homepage only<\/li>\n<li><code>\/pricing<\/code> - Exact page match<\/li>\n<li><code>\/blog\/*<\/code> - Single level wildcard<\/li>\n<li><code>\/shop\/**<\/code> - Any depth wildcard<\/li>\n<li><code>~^\/post\/\\d+$<\/code> - Regular expression (prefix with ~)<\/li>\n<\/ul>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 5.0 or higher<\/li>\n<li>PHP 7.4 or higher<\/li>\n<li>Write access to wp-content directory<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>varycache<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Go to Settings &gt; VaryCache to configure<\/li>\n<\/ol>\n\n<h4>Quick Start<\/h4>\n\n<ol>\n<li>Enable caching in the plugin settings<\/li>\n<li>Configure Page Cache to cache all pages or specific URLs<\/li>\n<li>Optionally set up A\/B tests, geo targeting, or query parameters<\/li>\n<li>Use shortcodes in your content to show different versions to different visitors<\/li>\n<\/ol>\n\n<h4>Using with Other Cache Plugins<\/h4>\n\n<p>If using another caching plugin, exclude pages with variant caching from that plugin's cache. VaryCache will handle caching for those pages with variant support.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20makes%20varycache%20different%20from%20other%20caching%20plugins%3F'><h3>What makes VaryCache different from other caching plugins?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id='can%20i%20use%20varycache%20just%20for%20page%20caching%20without%20a%2Fb%20testing%3F'><h3>Can I use VaryCache just for page caching without A\/B testing?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id='how%20does%20geo%20targeting%20detect%20the%20visitor%27s%20country%3F'><h3>How does geo targeting detect the visitor's country?<\/h3><\/dt>\n<dd><p>VaryCache reads country information from HTTP headers provided by CDNs:\n- CloudFront: <code>CloudFront-Viewer-Country<\/code>\n- Cloudflare: <code>CF-IPCountry<\/code>\n- Custom: You can configure your own header name<\/p>\n\n<p>If no header is detected, the country code will be \"XX\".<\/p><\/dd>\n<dt id='does%20this%20work%20with%20page%20builders%20like%20elementor%3F'><h3>Does this work with page builders like Elementor?<\/h3><\/dt>\n<dd><p>Yes! The shortcodes work with any page builder including Elementor, Gutenberg, Divi, WPBakery, and others. Simply add the shortcode blocks where needed.<\/p><\/dd>\n<dt id='how%20are%20visitors%20assigned%20to%20a%2Fb%20test%20variants%3F'><h3>How are visitors assigned to A\/B test variants?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id='does%20a%2Fb%20testing%20affect%20seo%3F'><h3>Does A\/B testing affect SEO?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id='what%20are%20the%20speed%20optimization%20features%3F'><h3>What are the speed optimization features?<\/h3><\/dt>\n<dd><p>VaryCache includes several Core Web Vitals optimizations:\n- <strong>HTML Minification<\/strong> - Reduces page size by removing whitespace\n- <strong>DNS Prefetch<\/strong> - Pre-resolves external domains (Google Fonts, Analytics, etc.)\n- <strong>Preload Resources<\/strong> - Preloads critical fonts, CSS, and hero images (improves LCP)\n- <strong>Disable Emoji<\/strong> - Removes WordPress emoji scripts (~15KB savings)\n- <strong>Image Dimensions<\/strong> - Adds missing width\/height to prevent layout shifts (CLS)\n- <strong>Gzip Compression<\/strong> - Compresses HTML output to reduce page size by ~70%\n- <strong>Link Prefetch<\/strong> - Preloads pages when user hovers over links<\/p><\/dd>\n<dt id='how%20does%20rest%20api%20caching%20work%3F'><h3>How does REST API caching work?<\/h3><\/dt>\n<dd><p>You can configure specific REST API endpoints to be cached (e.g., <code>\/wp\/v2\/posts<\/code>). Cached responses are served directly without executing PHP, significantly reducing server load for API-heavy sites.<\/p><\/dd>\n<dt id='where%20are%20cache%20files%20stored%3F'><h3>Where are cache files stored?<\/h3><\/dt>\n<dd><p>Cache files are stored in <code>wp-content\/cache\/varycache\/<\/code>. Settings are stored in <code>wp-content\/uploads\/varycache\/settings.json<\/code>. Both locations are WordPress-compliant.<\/p><\/dd>\n<dt id='can%20i%20clear%20the%20cache%20programmatically%3F'><h3>Can I clear the cache programmatically?<\/h3><\/dt>\n<dd><p>Yes, use <code>VaryCache_Cache::clear_cache()<\/code> in your code. The cache is also automatically cleared when posts are saved or deleted.<\/p><\/dd>\n<dt id='does%20varycache%20work%20with%20cdns%3F'><h3>Does VaryCache work with CDNs?<\/h3><\/dt>\n<dd><p>Yes, but for A\/B testing and geo targeting to work correctly, configure your CDN to:\n- Pass through cookies (for A\/B test variant assignment)\n- Forward country headers (for geo targeting)<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>NEW: Gzip Compression - compress HTML output by ~70% for faster loading<\/li>\n<li>Core Web Vitals improvement: reduced page size for better performance<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>NEW: Speed optimization tab with Core Web Vitals features<\/li>\n<li>NEW: HTML Minification - reduce page size by removing whitespace<\/li>\n<li>NEW: DNS Prefetch - pre-resolve external domains for faster loading<\/li>\n<li>NEW: Preload critical resources (fonts, CSS, images) for better LCP<\/li>\n<li>NEW: Remove query strings from static resources for better CDN caching<\/li>\n<li>NEW: Disable WordPress emoji scripts to save ~15KB<\/li>\n<li>NEW: Auto-add missing image dimensions to prevent CLS<\/li>\n<li>IMPROVED: Reorganized admin UI with logical grouping<\/li>\n<li>IMPROVED: Moved Link Prefetch and Browser Cache to Speed tab<\/li>\n<li>IMPROVED: Better separation of concerns in code<\/li>\n<li>Core Web Vitals optimizations: LCP, CLS improvements<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>NEW: REST API caching - cache REST endpoints to reduce server load<\/li>\n<li>NEW: Cache Preload - automatic and manual cache warming from sitemap<\/li>\n<li>NEW: Browser Cache Headers - Cache-Control, Expires, Last-Modified, Vary<\/li>\n<li>NEW: Page Cache admin tab with all caching settings<\/li>\n<li>NEW: Test REST endpoints for debugging (\/varycache\/v1\/test)<\/li>\n<li>IMPROVED: Admin interface with better organization<\/li>\n<li>IMPROVED: WordPress.org compliance updates<\/li>\n<li>IMPROVED: Changed prefix from 'vc' to 'varycache' per WordPress.org guidelines<\/li>\n<li>IMPROVED: Moved settings file to uploads directory per WordPress.org guidelines<\/li>\n<li>IMPROVED: Scripts now properly enqueued using wp_enqueue_script<\/li>\n<li>FIX: Various security improvements and code cleanup<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>A\/B testing with weighted variants<\/li>\n<li>Geo targeting via CloudFront\/Cloudflare headers<\/li>\n<li>Query parameter caching<\/li>\n<li>Page pattern matching (wildcards, regex)<\/li>\n<li>Admin settings panel with tabs<\/li>\n<li>Cache management and reporting<\/li>\n<li>Debug panel<\/li>\n<li>Shortcodes and PHP helper functions<\/li>\n<\/ul>","raw_excerpt":"Advanced caching with A\/B testing, geo-targeting, and speed optimizations. Serve different cached versions of pages.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/271606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=271606"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gkap186"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=271606"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=271606"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=271606"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=271606"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=271606"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=271606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}