E-commerce Caching
Cache everything. Invalidate instantly. Never show stale prices.
Built for Magento, Shopware, and WooCommerce.
E-commerce Caching Challenges
Price changes must be instant
Cache tags invalidate all affected pages in 3ms
Different prices for customer groups
Vary header support caches each group separately
Flash sales crash the backend
Request coalescing: 1000 users, 1 backend call
Cart/checkout must never be cached
Automatic session cookie bypass (secure by default)
Product updates affect many pages
Tag-based purge updates product, category, search pages
Inventory sync from ERP
REST API integrates with any inventory system
Cache Tags for E-commerce
Your e-commerce platform sends cache tags with every response. When a product changes, Trident knows exactly which pages to invalidate—no more, no less.
# Product page response from Magento/Shopware
HTTP/1.1 200 OK
X-Cache-Tags: product:SKU123, category:electronics, brand:samsung, store:default
Cache-Control: public, max-age=3600
# When product SKU123 price changes:
curl -X POST http://trident:8080/admin/purge/tag \
-d '{"tag": "product:SKU123", "mode": "soft"}'
# Result: Product page, category page, search results, related products
# All updated in 3ms. Users see new price immediately.Customer Group Caching
B2B stores often show different prices for retail vs wholesale customers. Trident caches each customer group separately using Vary headers.
# trident.toml
[cache.key]
vary_headers = ["X-Customer-Group"]
# Your backend sends:
# Vary: X-Customer-Group
# X-Customer-Group: wholesale
# Trident stores separate cache entries for:
# - retail customers (default pricing)
# - wholesale customers (discounted pricing)
# - VIP customers (special pricing)
# Each group sees their correct prices, fully cached!Magento 2: Works with built-in customer group headers.
Shopware 6: Compatible with sales channel pricing.
Flash Sale Protection
Without Trident
- ✗1000 users hit sale page at 9:00 AM
- ✗Cache just expired/purged
- ✗1000 requests hit backend simultaneously
- ✗Backend crashes, 503 errors everywhere
With Trident
- ✓1000 users hit sale page at 9:00 AM
- ✓Request coalescing activates
- ✓1 request to backend, 999 queued
- ✓All 1000 users get the page in 500ms
Platform Configurations
Magento 2
# trident.toml for Magento 2
[cache]
default_ttl = "1h"
grace_period = "24h"
[cache.key]
vary_headers = ["X-Magento-Vary"]
strip_cookies = ["PHPSESSID", "form_key", "mage-*"]
# Tags are automatic via X-Magento-Tags header
[cache.bypass]
cookies = ["frontend", "adminhtml"]
paths = ["/checkout/*", "/customer/*", "/admin/*"]Shopware 6
# trident.toml for Shopware 6
[cache]
default_ttl = "1h"
grace_period = "24h"
[cache.key]
vary_headers = ["X-Shopware-Context-Hash"]
strip_cookies = ["session-*", "sw-*"]
# Tags via X-Shopware-Cache-Id header
[cache.bypass]
cookies = ["sw-context-token"]
paths = ["/checkout/*", "/account/*", "/admin/*"]WooCommerce
# trident.toml for WooCommerce
[cache]
default_ttl = "1h"
grace_period = "24h"
[cache.key]
vary_headers = ["X-WC-Customer-Group"]
strip_cookies = ["wordpress_*", "wp-*", "comment_*"]
[cache.bypass]
cookies = ["woocommerce_items_in_cart", "woocommerce_cart_hash"]
paths = ["/cart/*", "/checkout/*", "/my-account/*", "/wp-admin/*"]E-commerce Results
Speed Up Your Store
Start your free trial with e-commerce optimized defaults.