E-commerce Optimized

E-commerce Caching

Cache everything. Invalidate instantly. Never show stale prices.
Built for Magento, Shopware, and WooCommerce.

Native Cache TagsCustomer GroupsFlash Sale Ready

E-commerce Caching Challenges

Challenge

Price changes must be instant

Trident Solution

Cache tags invalidate all affected pages in 3ms

Challenge

Different prices for customer groups

Trident Solution

Vary header support caches each group separately

Challenge

Flash sales crash the backend

Trident Solution

Request coalescing: 1000 users, 1 backend call

Challenge

Cart/checkout must never be cached

Trident Solution

Automatic session cookie bypass (secure by default)

Challenge

Product updates affect many pages

Trident Solution

Tag-based purge updates product, category, search pages

Challenge

Inventory sync from ERP

Trident Solution

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.
47
Pages invalidated
3ms
Purge time
1
API call

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

34.8x
Faster after purge
vs Varnish OSS
91%
Less RAM needed
with compression
68x
Faster bulk purge
100 products
0
Stale prices shown
soft purge magic

Speed Up Your Store

Start your free trial with e-commerce optimized defaults.