ecommerce-caching

Implement multi-layer caching for e-commerce storefronts using CDN, Redis, and Varnish.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill ecommerce-caching-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ecommerce-caching
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/infrastructure-performance/ecommerce-caching
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill ecommerce-caching-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ioredis.

What problem does it solve? E-commerce pages are slow because product, price, and inventory data is re-fetched from databases on every request, while naive caching breaks personalized content like cart counts and shows stale prices after updates. ## Core Features & Use Cases - Layered caching strategy: Configure CDN edge caching, Redis application cache, and full-page caching with correct Cache-Control headers per page type. - Cart-aware invalidation: Purge caches on product, price, or stock-status changes via event-driven invalidation instead of relying on TTL expiry. - Platform-specific guidance: Covers Shopify, WooCommerce, BigCommerce, and custom headless Node.js storefronts with concrete configuration steps. - Use Case: A headless Node.js store serves cached product pages at the CDN edge while hydrating cart count and live inventory client-side through a no-store personalization API. ## Quick Start Ask the AI to implement a layered caching strategy for your e-commerce storefront with CDN edge caching, Redis product caching, and event-driven cache invalidation.

Frequently Asked Questions about ecommerce-caching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cache e-commerce product pages without breaking cart counts?▼

Cache the full HTML page for anonymous visitors and load personalized data like cart count client-side after page load. Fetch it from a fast API endpoint that sets Cache-Control: private, no-store so it is never cached at the CDN or browser.

What Cache-Control headers should product and collection pages use?▼

Product pages use max-age=60, s-maxage=300 with stale-while-revalidate=600, while collection pages use max-age=120, s-maxage=600. Static assets with content-hashed filenames use max-age=31536000 with the immutable directive.

How do I invalidate CDN cache when a product price changes?▼

Use event-driven invalidation that reacts to price change events rather than waiting for TTL expiry. Purge both the product page and related collection pages, using Surrogate-Key tags or URL-based purging via the CDN API.

Does this caching approach work with Shopify and WooCommerce?▼

Yes, the skill covers platform-specific setups. Shopify manages CDN and page caching for you, so you optimize Liquid templates and apps; WooCommerce uses a three-layer stack of Redis object cache, WP Rocket page cache, and Cloudflare CDN.

Why is my CDN cache hit rate low on a commerce site?▼

Low hit rates usually come from tracking parameters like utm_source creating unique cache keys and Vary: Cookie headers disabling caching. Strip marketing query parameters at the CDN and unset cookies for cacheable pages in Varnish.

Should every inventory update trigger a cache purge?▼

No, only purge the page cache when stock status transitions between in-stock and out-of-stock. A quantity change from 50 to 49 does not need a purge; store live inventory in Redis and serve it through the personalization endpoint instead.