E-Commerce Platform Templates¶
These complete configurations require a valid Trident Core licence at
/etc/trident/license.key, readable by the service user. The explicit
license.path below selects that file; mounting a licence without configuring
its path does not activate caching. A successful --check validates the
configuration, not the entitlement. Verify licensed runtime status and a
cacheable MISS followed by HIT with identical complete bodies.
Configuration validation is not an integration test
These JSON examples are checked with the Trident 1.8.0 parser. That confirms configuration acceptance, not live application behavior, production readiness, or coverage of every platform version. Keep the origin's private, no-store, authorization and session protections; validate exact anonymous/customer/cart bodies and invalidation in your own deployment. Request-phase pass rules take precedence over response TTL rules.
Replace example.com and www.example.com in cache.poisoning.known_hosts with every hostname this instance actually serves, and set TRIDENT_ADMIN_TOKEN to a strong secret in the service environment. The admin and metrics endpoints below bind to loopback. Per-rule TTLs remain capped by ttl.max; origin freshness takes precedence where no rule overrides it.
Backend addresses must point to an HTTP application/web server, not directly to a PHP-FPM/FastCGI listener. Replace example ports with the actual HTTP endpoint.
Save JSON as /etc/trident/config.json (not a .toml file), select that path with TRIDENT_CONFIG=/etc/trident/config.json in /etc/default/trident, and run trident --config /etc/trident/config.json --check before the normal reload/restart procedure. A TOML deployment must use a real TOML translation and its corresponding selected path.
Configuration starting points for the current Trident Core schema. Application behavior and installed package versions require separate qualification.
Magento 2¶
Magento 2 is a PHP-based e-commerce platform with a large cache footprint. This example declares: a 4 GB cache to handle Magento's extensive catalog pages, GraphQL query caching (GET only) to accelerate headless storefronts, native X-Magento-Tags header integration for surgical cache invalidation. Static and media assets get long TTLs, while admin, checkout, customer, and REST API routes bypass the cache entirely. Launch is explicitly disabled in this example. Enabling it requires its licensed maintenance/warming contract and separate deployment verification; this is not a zero-downtime guarantee.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Magento-Tags"
]
},
"max_memory": "4GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "magento",
"host": "127.0.0.1",
"port": 9000,
"health": {
"enabled": true,
"path": "/health_check.php",
"interval": "10s",
"timeout": "5s",
"threshold_healthy": 2,
"threshold_unhealthy": 3
},
"connection_limit": {
"enabled": true,
"max_connections": 50,
"queue_size": 100,
"queue_timeout": "30s"
}
}
],
"directors": [
{
"name": "default",
"backends": [
"magento"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "magento_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "magento_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "magento_customer",
"match": {
"path": {
"pattern": "^/customer"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "magento_api",
"match": {
"path": {
"pattern": "^/rest/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "magento_static",
"match": {
"path": {
"pattern": "^/static/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "magento_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "magento_graphql",
"match": {
"path": "/graphql",
"method": [
"GET"
]
},
"priority": 106,
"action": {
"ttl": "5m"
}
}
]
},
"launch": {
"enabled": false,
"persist_state": true,
"state_file": "/var/lib/trident/launch-state.json",
"max_urls": 10000
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
},
"backend_protection": {
"enabled": true
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Magento-Tags"
]
},
"max_memory": "4GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "magento",
"host": "127.0.0.1",
"port": 9000,
"health": {
"enabled": true,
"path": "/health_check.php",
"interval": "10s",
"timeout": "5s",
"threshold_healthy": 2,
"threshold_unhealthy": 3
},
"connection_limit": {
"enabled": true,
"max_connections": 50,
"queue_size": 100,
"queue_timeout": "30s"
}
}
],
"directors": [
{
"name": "default",
"backends": [
"magento"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "magento_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "magento_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "magento_customer",
"match": {
"path": {
"pattern": "^/customer"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "magento_api",
"match": {
"path": {
"pattern": "^/rest/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "magento_static",
"match": {
"path": {
"pattern": "^/static/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "magento_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "magento_graphql",
"match": {
"path": "/graphql",
"method": [
"GET"
]
},
"priority": 106,
"action": {
"ttl": "5m"
}
}
]
},
"launch": {
"enabled": false,
"persist_state": true,
"state_file": "/var/lib/trident/launch-state.json",
"max_urls": 10000
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
},
"backend_protection": {
"enabled": true
}
}
WooCommerce¶
WooCommerce runs on WordPress and PHP-FPM. This template provides a 2 GB cache with rules tailored to the WordPress directory layout: long TTLs for wp-content and wp-includes assets, and cache bypass for wp-admin, wp-login.php, and AJAX endpoints. WooCommerce-specific paths like /cart, /checkout, and /my-account are passed through uncached. Two cookie-based rules handle logged-in user detection via the wordpress_logged_in_* cookie and active cart detection via the woocommerce_cart_hash cookie, intended to keep personalized or cart-containing requests uncached; verify the cookie names and exact body isolation for your installed application.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "wordpress",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"wordpress"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "wp_admin",
"match": {
"path": {
"pattern": "^/wp\\-admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "wp_login",
"match": {
"path": "/wp-login.php"
},
"priority": 103,
"action": "pass"
},
{
"name": "woo_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "woo_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "woo_my_account",
"match": {
"path": {
"pattern": "^/my\\-account"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "wp_ajax",
"match": {
"path": "/wp-admin/admin-ajax.php"
},
"priority": 108,
"action": "pass"
},
{
"name": "logged_in_users",
"match": {
"header": {
"Cookie": {
"pattern": "wordpress_logged_in_.*"
}
}
},
"priority": 109,
"action": "pass"
},
{
"name": "woo_cart_cookie",
"match": {
"header": {
"Cookie": {
"pattern": "woocommerce_cart_hash"
}
}
},
"priority": 110,
"action": "pass"
}
],
"response": [
{
"name": "wp_static",
"match": {
"path": {
"pattern": "^/wp\\-content/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "wp_includes",
"match": {
"path": {
"pattern": "^/wp\\-includes/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "woo_api",
"match": {
"path": {
"pattern": "^/wp\\-json/wc/"
},
"method": [
"GET"
]
},
"priority": 107,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "wordpress",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"wordpress"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "wp_admin",
"match": {
"path": {
"pattern": "^/wp\\-admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "wp_login",
"match": {
"path": "/wp-login.php"
},
"priority": 103,
"action": "pass"
},
{
"name": "woo_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "woo_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "woo_my_account",
"match": {
"path": {
"pattern": "^/my\\-account"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "wp_ajax",
"match": {
"path": "/wp-admin/admin-ajax.php"
},
"priority": 108,
"action": "pass"
},
{
"name": "logged_in_users",
"match": {
"header": {
"Cookie": {
"pattern": "wordpress_logged_in_.*"
}
}
},
"priority": 109,
"action": "pass"
},
{
"name": "woo_cart_cookie",
"match": {
"header": {
"Cookie": {
"pattern": "woocommerce_cart_hash"
}
}
},
"priority": 110,
"action": "pass"
}
],
"response": [
{
"name": "wp_static",
"match": {
"path": {
"pattern": "^/wp\\-content/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "wp_includes",
"match": {
"path": {
"pattern": "^/wp\\-includes/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "woo_api",
"match": {
"path": {
"pattern": "^/wp\\-json/wc/"
},
"method": [
"GET"
]
},
"priority": 107,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
Shopware 6¶
Shopware 6 is a Symfony-based e-commerce platform. This template uses a 2 GB cache and is configured for Shopware's asset layout: /bundles/ for compiled plugin assets, /theme/ for storefront themes, and /media/ for product images. The Store API (/store-api/) is cached for GET requests with a short TTL, while the admin API (/api/) is always passed through. This example expects space-separated X-Cache-Tags; verify the header and separator emitted by your installed Shopware integration.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": " ",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "shopware",
"host": "127.0.0.1",
"port": 8000
}
],
"directors": [
{
"name": "default",
"backends": [
"shopware"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "shopware_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "shopware_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "shopware_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "shopware_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "shopware_static",
"match": {
"path": {
"pattern": "^/bundles/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "shopware_theme",
"match": {
"path": {
"pattern": "^/theme/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "shopware_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
},
{
"name": "shopware_store_api",
"match": {
"path": {
"pattern": "^/store\\-api/"
},
"method": [
"GET"
]
},
"priority": 105,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": " ",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "shopware",
"host": "127.0.0.1",
"port": 8000
}
],
"directors": [
{
"name": "default",
"backends": [
"shopware"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "shopware_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "shopware_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "shopware_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "shopware_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "shopware_static",
"match": {
"path": {
"pattern": "^/bundles/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "shopware_theme",
"match": {
"path": {
"pattern": "^/theme/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "shopware_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
},
{
"name": "shopware_store_api",
"match": {
"path": {
"pattern": "^/store\\-api/"
},
"method": [
"GET"
]
},
"priority": 105,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
PrestaShop¶
PrestaShop is a PHP-based e-commerce platform with a 2 GB cache configuration. Static assets are served from /themes/ and /modules/ with long TTLs, while product images under /img/ get a 7-day TTL. A distinguishing feature of this template is the regex-based admin path rule (/admin[a-z0-9]*/) -- PrestaShop randomizes its admin directory name during installation for security, so a static prefix match will not work. Cart, order, my-account, and API routes all bypass the cache.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "prestashop",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"prestashop"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "ps_admin",
"match": {
"path": {
"pattern": "/admin[a-z0-9]*/"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "ps_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "ps_order",
"match": {
"path": {
"pattern": "^/order"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "ps_my_account",
"match": {
"path": {
"pattern": "^/my\\-account"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "ps_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "ps_themes",
"match": {
"path": {
"pattern": "^/themes/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "ps_modules",
"match": {
"path": {
"pattern": "^/modules/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "ps_img",
"match": {
"path": {
"pattern": "^/img/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "prestashop",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"prestashop"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "ps_admin",
"match": {
"path": {
"pattern": "/admin[a-z0-9]*/"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "ps_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "ps_order",
"match": {
"path": {
"pattern": "^/order"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "ps_my_account",
"match": {
"path": {
"pattern": "^/my\\-account"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "ps_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "ps_themes",
"match": {
"path": {
"pattern": "^/themes/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "ps_modules",
"match": {
"path": {
"pattern": "^/modules/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "ps_img",
"match": {
"path": {
"pattern": "^/img/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
Sylius¶
Sylius is built on Symfony and exposes a REST API alongside its storefront. This template provides a 2 GB cache with rules for Symfony's compiled /assets/ directory (30-day TTL) and /media/ uploads (7-day TTL). The Sylius REST API under /api/ is cached for GET requests with a 5-minute TTL, making it suitable for headless storefronts that read product data through the API. Admin, cart, checkout, and account routes bypass the cache entirely.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "sylius",
"host": "127.0.0.1",
"port": 8000
}
],
"directors": [
{
"name": "default",
"backends": [
"sylius"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "sylius_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "sylius_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "sylius_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "sylius_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 106,
"action": "pass"
}
],
"response": [
{
"name": "sylius_assets",
"match": {
"path": {
"pattern": "^/assets/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "sylius_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "sylius_api",
"match": {
"path": {
"pattern": "^/api/"
},
"method": [
"GET"
]
},
"priority": 103,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "2GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "sylius",
"host": "127.0.0.1",
"port": 8000
}
],
"directors": [
{
"name": "default",
"backends": [
"sylius"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "sylius_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "sylius_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "sylius_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "sylius_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 106,
"action": "pass"
}
],
"response": [
{
"name": "sylius_assets",
"match": {
"path": {
"pattern": "^/assets/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "sylius_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "sylius_api",
"match": {
"path": {
"pattern": "^/api/"
},
"method": [
"GET"
]
},
"priority": 103,
"action": {
"ttl": "5m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "1h",
"max": "30d"
}
}
Shopify Headless¶
Qualification: configuration example only; no live platform pairing is qualified by this page.
This template is for headless Shopify storefronts built with Next.js, Hydrogen, or similar frameworks. Unlike traditional server-rendered platforms, the backend here is your Node.js storefront application (port 3000), not Shopify itself. The cache is sized at 1 GB with a shorter 15-minute default TTL to keep product data fresh. Next.js build assets under /_next/static/ and optimized images under /_next/image get long TTLs. Product and collection pages are cached with tag support for targeted invalidation via webhooks. Cart, checkout, account, and custom API routes bypass the cache.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "1GB",
"grace_period": "120s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "storefront",
"host": "127.0.0.1",
"port": 3000
}
],
"directors": [
{
"name": "default",
"backends": [
"storefront"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "storefront_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "storefront_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "storefront_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "storefront_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "storefront_static",
"match": {
"path": {
"pattern": "^/_next/static/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "storefront_images",
"match": {
"path": {
"pattern": "^/_next/image"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "storefront_products",
"match": {
"path": {
"pattern": "^/products/"
}
},
"priority": 106,
"action": {
"ttl": "15m"
}
},
{
"name": "storefront_collections",
"match": {
"path": {
"pattern": "^/collections/"
}
},
"priority": 107,
"action": {
"ttl": "15m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "15m",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "1GB",
"grace_period": "120s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "storefront",
"host": "127.0.0.1",
"port": 3000
}
],
"directors": [
{
"name": "default",
"backends": [
"storefront"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "storefront_api",
"match": {
"path": {
"pattern": "^/api/"
}
},
"priority": 102,
"action": "pass"
},
{
"name": "storefront_cart",
"match": {
"path": {
"pattern": "^/cart"
}
},
"priority": 103,
"action": "pass"
},
{
"name": "storefront_checkout",
"match": {
"path": {
"pattern": "^/checkout"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "storefront_account",
"match": {
"path": {
"pattern": "^/account"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "storefront_static",
"match": {
"path": {
"pattern": "^/_next/static/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "storefront_images",
"match": {
"path": {
"pattern": "^/_next/image"
}
},
"priority": 101,
"action": {
"ttl": "7d"
}
},
{
"name": "storefront_products",
"match": {
"path": {
"pattern": "^/products/"
}
},
"priority": 106,
"action": {
"ttl": "15m"
}
},
{
"name": "storefront_collections",
"match": {
"path": {
"pattern": "^/collections/"
}
},
"priority": 107,
"action": {
"ttl": "15m"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "15m",
"max": "30d"
}
}
Medusa.js¶
Qualification: configuration example only; no live platform pairing is qualified by this page.
Medusa.js is an API-first, headless commerce engine built on Node.js. This template uses a 1 GB cache with a 30-minute default TTL. The Store API endpoints for products, collections, and regions are cached for GET requests with varying TTLs -- regions get a longer 1-hour TTL since they change infrequently. Cart, checkout, customer, and order endpoints are always passed through to the origin since they carry session-specific data. The admin dashboard is bypassed entirely.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "1GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "medusa",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"medusa"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "medusa_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "medusa_cart",
"match": {
"path": {
"pattern": "^/store/carts"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "medusa_checkout",
"match": {
"path": {
"pattern": "^/store/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "medusa_customers",
"match": {
"path": {
"pattern": "^/store/customers"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "medusa_orders",
"match": {
"path": {
"pattern": "^/store/orders"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "medusa_store_products",
"match": {
"path": {
"pattern": "^/store/products"
},
"method": [
"GET"
]
},
"priority": 101,
"action": {
"ttl": "15m"
}
},
{
"name": "medusa_store_collections",
"match": {
"path": {
"pattern": "^/store/collections"
},
"method": [
"GET"
]
},
"priority": 102,
"action": {
"ttl": "15m"
}
},
{
"name": "medusa_store_regions",
"match": {
"path": {
"pattern": "^/store/regions"
},
"method": [
"GET"
]
},
"priority": 103,
"action": {
"ttl": "1h"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "30m",
"max": "30d"
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "1GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "medusa",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"medusa"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "medusa_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "medusa_cart",
"match": {
"path": {
"pattern": "^/store/carts"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "medusa_checkout",
"match": {
"path": {
"pattern": "^/store/checkout"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "medusa_customers",
"match": {
"path": {
"pattern": "^/store/customers"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "medusa_orders",
"match": {
"path": {
"pattern": "^/store/orders"
}
},
"priority": 107,
"action": "pass"
}
],
"response": [
{
"name": "medusa_store_products",
"match": {
"path": {
"pattern": "^/store/products"
},
"method": [
"GET"
]
},
"priority": 101,
"action": {
"ttl": "15m"
}
},
{
"name": "medusa_store_collections",
"match": {
"path": {
"pattern": "^/store/collections"
},
"method": [
"GET"
]
},
"priority": 102,
"action": {
"ttl": "15m"
}
},
{
"name": "medusa_store_regions",
"match": {
"path": {
"pattern": "^/store/regions"
},
"method": [
"GET"
]
},
"priority": 103,
"action": {
"ttl": "1h"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "30m",
"max": "30d"
}
}
Saleor¶
Qualification: configuration example only; no live platform pairing is qualified by this page.
Saleor is a GraphQL-first e-commerce platform built on Django. This template uses a 1 GB cache with a 15-minute default TTL. The key distinction is how GraphQL is handled: GET requests to /graphql/ are cached (these are typically persisted queries or simple reads), while POST requests are passed through since they may contain mutations or complex queries that are not safe to cache. Static assets and media get long TTLs. The Saleor dashboard and plugin webhook endpoints bypass the cache.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": ",",
"headers": [
"X-Cache-Tags"
]
},
"max_memory": "1GB",
"grace_period": "60s",
"stale_while_revalidate": {
"enabled": true
},
"stale_if_error": {
"enabled": true,
"max_stale_age": "300s"
},
"poisoning": {
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"backends": [
{
"name": "saleor",
"host": "127.0.0.1",
"port": 8000
}
],
"directors": [
{
"name": "default",
"backends": [
"saleor"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "saleor_graphql_post",
"match": {
"path": "/graphql/",
"method": [
"POST"
]
},
"priority": 101,
"action": "pass"
},
{
"name": "saleor_dashboard",
"match": {
"path": {
"pattern": "^/dashboard/"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "saleor_plugins",
"match": {
"path": {
"pattern": "^/plugins/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "saleor_graphql_get",
"match": {
"path": "/graphql/",
"method": [
"GET"
]
},
"priority": 100,
"action": {
"ttl": "15m"
}
},
{
"name": "saleor_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
},
{
"name": "saleor_static",
"match": {
"path": {
"pattern": "^/static/"
}
},
"priority": 103,
"action": {
"ttl": "30d"
}
}
]
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9100",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9191",
"path": "/metrics",
"stats_path": "/stats"
},
"ttl": {
"mode": "origin",
"default": "15m",
"max": "30d"
}
}