Country Caching Extension
DUE TO PERSONAL CIRCUMSTANCES I AM NO LONGER ABLE TO DEVELOP OR SUPPORT THIS PLUGIN. IF YOU ARE INTERESTED IN ADOPTING THIS PLUGIN SEE https://developer.wordpress.org/plugins/wordpress-org/take-over-an-existing-plugin/ Solves wrong country content for visitor Geo-Location issues. Enables Comet Cache to display the correct page and widget content for a visitor’s country. Bonus also makes Cookie Notice work correctly with Comet Cache (whether using country/EU geolocation or not). If you need country caching with other caching plugins then see “Advice” below. This plugin adds an extension to Comet Cache enabling it to create separate snapshots (cache) for each page based on country location. Extra caching can be restricted to specific countries and/or a group of countries. E.g. if you are based in the US but show different content to Canadian,Mexican & EU country visitors, you can set separate caching for CA & MX visitors + single group cache for EU visitors; the remainder of your visitors will standard cache (“US”) content. It works on normal WordPress and on Multisite (see FAQ). Comet Cache is designed to work with add-on scripts and should work seamlessly with this plugin. Identification of visitor country for caching Via Cloudflare or Maxmind. (this product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com ) It is also possible to connect a different GeoLocation sytem of your choice (see documentation). If you use Cloudflare and have “switched on” their GeoLocation option ( see Cloudflare’s instructions ) then it will be used to identify visitor country. If not, then the Maxmind Country Database will be used. Updating (If not using Cloudflare for country) The installed Maxmind Country/IP data file will lose accuracy over time. To automate a monthly update of this file, install and enable the Category Country Aware (CCA) plugin (Country Caching and the Cataegory Country Aware (CCA) plugins use the same Maxmind data file in the same folder and the CCA plugin includes code for its update). The CCA plugin has many other features and functionality you may find useful. Alternatively you can manually update (FAQ below). Additional Info and support ADVICE: Don’t use ANY Caching plugin UNLESS you know how to use an FTP program (e.g. Filezilla). Support forums show that Caching plugins including Comet Cache can result in “white screen” problems for some users; the only solution may be to delete files using FTP/Cpanel or OS command line. The Country Caching plugin deletes files on deactivation/delete, but in “white screen” situations you may have to resort to “manual” deletion – see FAQ for instructions. WP Super Cache: is also designed to work with “add-ons” and an equivalent of this plugin is available in the WordPress repository. W3 Total Cache does not currently provide a suitable hook for plugin country caching. Others have requested this facility. License This program is free software licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. In particular please note the following: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Mamba Cache for WooCommerce
Mamba Cache is the fastest caching solution built from the ground up for WooCommerce stores. Unlike generic caching plugins adapted for WooCommerce, Mamba understands your store’s unique needs — products, categories, inventory, pricing, cart sessions, and checkout flows. Why Mamba for WooCommerce? Built for WooCommerce — Not a generic cache with WooCommerce compatibility bolted on Sub-millisecond response times — Serve cached pages in – Purge specific URL – wp mamba-cache-for-woocommerce purge urls – Purge URLs from a file (one per line) – wp mamba-cache-for-woocommerce purge product – Purge cache for specific product ID – wp mamba-cache-for-woocommerce purge category – Purge cache for specific category – wp mamba-cache-for-woocommerce purge shop – Purge shop page cache – wp mamba-cache-for-woocommerce purge home – Purge homepage cache – wp mamba-cache-for-woocommerce purge tags – Purge CDN by cache tags Warmup Commands: – wp mamba-cache-for-woocommerce warmup start – Start background cache warmup – wp mamba-cache-for-woocommerce warmup status – Check warmup job progress (JSON output) – wp mamba-cache-for-woocommerce warmup cancel – Cancel running warmup job – wp mamba-cache-for-woocommerce warmup resume – Resume paused warmup job – wp mamba-cache-for-woocommerce warmup errors – View warmup errors (JSON output) Options: – --and-warm – Automatically warm the URL after purging (available on url, urls, category, shop, home commands) Examples: # Purge all cache wp mamba-cache-for-woocommerce purge all # Purge and warm a specific product wp mamba-cache-for-woocommerce purge product 123 –and-warm # Purge shop page and warm it wp mamba-cache-for-woocommerce purge shop –and-warm # Start warmup job wp mamba-cache-for-woocommerce warmup start # Check warmup status wp mamba-cache-for-woocommerce warmup status REST API Endpoints Programmatic access to Mamba’s WooCommerce caching and optimization features: Status & Monitoring: – GET /wp-json/mamba-wc/v1/cache-status – Cache status, hit rates, coverage metrics – GET /wp-json/mamba-wc/v1/stats – Detailed performance statistics – GET /wp-json/mamba-wc/v1/cache-counts – Cache counts by content type (products, categories, etc.) – GET /wp-json/mamba-wc/v1/purge-stats – Purge operation statistics Cache Management: – POST /wp-json/mamba-wc/v1/purge – Purge caches (body: {type: "all|page|api|url", url: "..."}) Warmup Operations: – POST /wp-json/mamba-wc/v1/warmup – Start foreground warmup – POST /wp-json/mamba-wc/v1/background-warmup – Start background warmup job – GET /wp-json/mamba-wc/v1/warmup-status – Check warmup job progress – POST /wp-json/mamba-wc/v1/warmup-cancel – Cancel running warmup job – POST /wp-json/mamba-wc/v1/warmup-resume – Resume paused warmup job – GET /wp-json/mamba-wc/v1/warmup-errors – Get warmup error log – GET /wp-json/mamba-wc/v1/background-jobs – List active background jobs Authentication: All REST endpoints require WordPress admin authentication (manage_options or manage_woocommerce capability). Use standard WordPress authentication methods (cookies, application passwords, or OAuth). Integration Examples Automated Product Updates: When updating products via API, automatically purge affected cache: # After updating product via WooCommerce REST API curl -X POST https://example.com/wp-json/mamba-wc/v1/purge \ -H “Content-Type: application/json” \ -d ‘{“type”:”url”,”url”:”https://example.com/product/my-product/”}’ \ -u username:password Deployment Scripts: Include cache warmup in deployment pipelines: # After deployment, clear stale cache and warm up wp mamba-cache-for-woocommerce purge all wp mamba-cache-for-woocommerce warmup start Monitoring Integration: Monitor WooCommerce performance in external systems: # Check warmup status wp mamba-cache-for-woocommerce warmup status Minimum Requirements – WordPress 5.0 or higher – WooCommerce 5.0 or higher – PHP 7.4 or higher – MySQL 5.6 or higher or MariaDB 10.1 or higher Recommended Server Configuration – PHP 8.0+ for optimal performance – Redis or Memcached for object caching – Apache or Nginx with mod_rewrite enabled – At least 256MB PHP memory limit External Services This plugin connects to external services in specific scenarios. Below is a complete list of all external service integrations: CDN Integration (Optional, User-Configured) When you configure CDN integration in the plugin settings, Mamba connects to your chosen CDN provider’s API to purge cached content: Cloudflare * Service: Cloudflare CDN and APO (Automatic Platform Optimization) * Data sent: Zone ID, purge requests (URLs or cache tags), API authentication token * When: Only when you configure Cloudflare integration and trigger cache purges * Terms of Service: https://www.cloudflare.com/terms/ * Privacy Policy: https://www.cloudflare.com/privacypolicy/ Bunny CDN * Service: Bunny CDN pull zone management * Data sent: Pull zone ID, purge requests (URLs or cache tags), API key * When: Only when you configure Bunny CDN integration and trigger cache purges * Terms of Service: https://bunny.net/tos/ * Privacy Policy: https://bunny.net/privacy/ Fastly * Service: Fastly CDN cache management * Data sent: Service ID, purge requests (URLs or surrogate keys), API token * When: Only when you configure Fastly integration and trigger cache purges * Terms of Service: https://www.fastly.com/terms/ * Privacy Policy: https://www.fastly.com/privacy/ Generic Webhook * Service: Custom webhook endpoint (user-defined) * Data sent: Purge payload as configured by user * When: Only when you configure a custom webhook and trigger cache purges * Note: You control the endpoint and data format DNS Prefetch and Preconnect Hints (Optional, User-Configured) When enabled, this plugin adds DNS prefetch and preconnect resource hints to help browsers establish early connections to domains your site already uses. The plugin does not load any files from these domains – it only adds HTML hints like to improve performance for resources your site already loads. Common domains that may be included in auto-detection (if enabled): Google Fonts (fonts.googleapis.com, fonts.gstatic.com) – for sites using Google Fonts Google Analytics (www.google-analytics.com) – for sites using Google Analytics Payment gateways (js.stripe.com, www.paypal.com, etc.) – for WooCommerce checkout pages These hints only benefit domains your site already uses. No data is sent to these domains by the plugin itself. Freemius SDK (License Management) This plugin uses Freemius for license management and optional usage analytics: * Service: Freemius SDK * Data sent: License key validation, optional anonymous usage statistics (if opted in) * When: License activation, plugin updates, optional analytics * Terms of Service: https://freemius.com/terms/ * Privacy Policy: https://freemius.com/privacy/