CMS Platforms¶
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.
WordPress¶
WordPress and WooCommerce rule example
This example includes WooCommerce (cart, checkout, account, wishlist, compare), multi-language setups with vary headers, and extensive request/response rules. Origin TTL mode respects backend Cache-Control headers so your WordPress caching plugin stays in control.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8090",
"protocol": "http1"
}
],
"preserve_host": true
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9301",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9190",
"path": "/metrics",
"stats_path": "/stats"
},
"cache": {
"max_memory": "2GB",
"max_entries": 1000000,
"grace_period": "30m",
"key": {
"hash_algorithm": "sha256",
"include_query": true,
"normalize_query": true,
"cache_with_cookies": true,
"ignore_client_cache_control": true,
"honor_vary": true,
"vary_headers": [
"X-WC-Currency",
"X-WC-Country"
]
},
"tags": {
"headers": [
"X-Cache-Tags"
],
"separator": ",",
"strip_header": false
},
"poisoning": {
"header_allowlist": [
"Accept",
"Accept-Encoding",
"Accept-Language",
"Origin",
"X-UA-Device",
"X-WC-Currency",
"X-WC-Country"
],
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"ttl": {
"mode": "origin",
"default": "5m",
"max": "7d"
},
"backends": [
{
"name": "default",
"host": "nginx-backend",
"port": 80,
"health": {
"path": "/backend-health",
"interval": "10s",
"timeout": "2s"
}
}
],
"directors": [
{
"name": "default",
"backends": [
"default"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "wp_admin",
"match": {
"path": {
"pattern": "^/wp-admin"
}
},
"action": "pass",
"priority": 100
},
{
"name": "wp_login",
"match": {
"path": "/wp-login.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_cron",
"match": {
"path": "/wp-cron.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_comments",
"match": {
"path": "/wp-comments-post.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_ajax",
"match": {
"path": "/wp-admin/admin-ajax.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_rest_write",
"match": {
"path": {
"pattern": "^/wp-json/"
},
"method": [
"POST",
"PUT",
"DELETE",
"PATCH"
]
},
"action": "pass",
"priority": 90
},
{
"name": "wp_logged_in",
"match": {
"header": {
"Cookie": {
"pattern": "wordpress_logged_in_"
}
}
},
"action": "pass",
"priority": 80
},
{
"name": "post_requests",
"match": {
"method": "POST"
},
"action": "pass",
"priority": 70
},
{
"name": "woo_cart",
"match": {
"path": {
"pattern": "^/(cart|winkelwagen|panier|warenkorb|carrito)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_checkout",
"match": {
"path": {
"pattern": "^/(checkout|afrekenen|paiement|kasse|caja)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_account",
"match": {
"path": {
"pattern": "^/(my-account|mijn-account|mon-compte|mein-konto|mi-cuenta)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_wishlist",
"match": {
"path": {
"pattern": "^/(wishlist|verlanglijst|liste-de-souhaits|wunschliste|lista-de-deseos)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_compare",
"match": {
"path": {
"pattern": "^/(compare|vergelijken|comparer|vergleichen|comparar)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_ajax",
"match": {
"path": "/?wc-ajax="
},
"action": "pass",
"priority": 100
},
{
"name": "woo_api",
"match": {
"path": {
"pattern": "^/wc-api/"
}
},
"action": "pass",
"priority": 100
}
],
"response": [
{
"name": "wp_static_long",
"match": {
"path": {
"pattern": "^/wp-(content|includes)/.*\\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$"
}
},
"action": {
"ttl": "30d"
},
"priority": 100
},
{
"name": "wp_uploads",
"match": {
"path": {
"pattern": "^/wp-content/uploads/"
}
},
"action": {
"ttl": "30d"
},
"priority": 100
},
{
"name": "wp_feeds",
"match": {
"path": {
"pattern": "^/feed"
}
},
"action": {
"ttl": "15m"
},
"priority": 90
},
{
"name": "wp_rest_read",
"match": {
"path": {
"pattern": "^/wp-json/"
},
"status": 200
},
"action": {
"ttl": "5m"
},
"priority": 80
},
{
"name": "wp_sitemap",
"match": {
"path": {
"pattern": "sitemap.*\\.xml$"
}
},
"action": {
"ttl": "1h"
},
"priority": 80
},
{
"name": "wp_archives",
"match": {
"path": {
"pattern": "^/(category|tag|author|[0-9]{4}/)"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "wp_homepage",
"match": {
"path": "/"
},
"action": {
"ttl": "5m"
},
"priority": 60
},
{
"name": "woo_shop",
"match": {
"path": {
"pattern": "^/shop(/|$)"
}
},
"action": {
"ttl": "5m"
},
"priority": 70
},
{
"name": "woo_category",
"match": {
"path": {
"pattern": "^/product-category/"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "woo_tag",
"match": {
"path": {
"pattern": "^/product-tag/"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "no_cache_errors",
"match": {
"status": [
400,
401,
403,
404,
500,
502,
503,
504
]
},
"action": "pass",
"priority": 200
},
{
"name": "no_cache_redirects",
"match": {
"status": [
301,
302,
303,
307,
308
]
},
"action": "pass",
"priority": 200
}
]
}
}
¶
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8090",
"protocol": "http1"
}
],
"preserve_host": true
},
"admin": {
"enabled": true,
"address": "127.0.0.1:9301",
"auth_token": "${TRIDENT_ADMIN_TOKEN}"
},
"metrics": {
"enabled": true,
"address": "127.0.0.1:9190",
"path": "/metrics",
"stats_path": "/stats"
},
"cache": {
"max_memory": "2GB",
"max_entries": 1000000,
"grace_period": "30m",
"key": {
"hash_algorithm": "sha256",
"include_query": true,
"normalize_query": true,
"cache_with_cookies": true,
"ignore_client_cache_control": true,
"honor_vary": true,
"vary_headers": [
"X-WC-Currency",
"X-WC-Country"
]
},
"tags": {
"headers": [
"X-Cache-Tags"
],
"separator": ",",
"strip_header": false
},
"poisoning": {
"header_allowlist": [
"Accept",
"Accept-Encoding",
"Accept-Language",
"Origin",
"X-UA-Device",
"X-WC-Currency",
"X-WC-Country"
],
"known_hosts": [
"example.com",
"www.example.com"
]
}
},
"ttl": {
"mode": "origin",
"default": "5m",
"max": "7d"
},
"backends": [
{
"name": "default",
"host": "nginx-backend",
"port": 80,
"health": {
"path": "/backend-health",
"interval": "10s",
"timeout": "2s"
}
}
],
"directors": [
{
"name": "default",
"backends": [
"default"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "wp_admin",
"match": {
"path": {
"pattern": "^/wp-admin"
}
},
"action": "pass",
"priority": 100
},
{
"name": "wp_login",
"match": {
"path": "/wp-login.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_cron",
"match": {
"path": "/wp-cron.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_comments",
"match": {
"path": "/wp-comments-post.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_ajax",
"match": {
"path": "/wp-admin/admin-ajax.php"
},
"action": "pass",
"priority": 100
},
{
"name": "wp_rest_write",
"match": {
"path": {
"pattern": "^/wp-json/"
},
"method": [
"POST",
"PUT",
"DELETE",
"PATCH"
]
},
"action": "pass",
"priority": 90
},
{
"name": "wp_logged_in",
"match": {
"header": {
"Cookie": {
"pattern": "wordpress_logged_in_"
}
}
},
"action": "pass",
"priority": 80
},
{
"name": "post_requests",
"match": {
"method": "POST"
},
"action": "pass",
"priority": 70
},
{
"name": "woo_cart",
"match": {
"path": {
"pattern": "^/(cart|winkelwagen|panier|warenkorb|carrito)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_checkout",
"match": {
"path": {
"pattern": "^/(checkout|afrekenen|paiement|kasse|caja)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_account",
"match": {
"path": {
"pattern": "^/(my-account|mijn-account|mon-compte|mein-konto|mi-cuenta)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_wishlist",
"match": {
"path": {
"pattern": "^/(wishlist|verlanglijst|liste-de-souhaits|wunschliste|lista-de-deseos)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_compare",
"match": {
"path": {
"pattern": "^/(compare|vergelijken|comparer|vergleichen|comparar)(/|$)"
}
},
"action": "pass",
"priority": 100
},
{
"name": "woo_ajax",
"match": {
"path": "/?wc-ajax="
},
"action": "pass",
"priority": 100
},
{
"name": "woo_api",
"match": {
"path": {
"pattern": "^/wc-api/"
}
},
"action": "pass",
"priority": 100
}
],
"response": [
{
"name": "wp_static_long",
"match": {
"path": {
"pattern": "^/wp-(content|includes)/.*\\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$"
}
},
"action": {
"ttl": "30d"
},
"priority": 100
},
{
"name": "wp_uploads",
"match": {
"path": {
"pattern": "^/wp-content/uploads/"
}
},
"action": {
"ttl": "30d"
},
"priority": 100
},
{
"name": "wp_feeds",
"match": {
"path": {
"pattern": "^/feed"
}
},
"action": {
"ttl": "15m"
},
"priority": 90
},
{
"name": "wp_rest_read",
"match": {
"path": {
"pattern": "^/wp-json/"
},
"status": 200
},
"action": {
"ttl": "5m"
},
"priority": 80
},
{
"name": "wp_sitemap",
"match": {
"path": {
"pattern": "sitemap.*\\.xml$"
}
},
"action": {
"ttl": "1h"
},
"priority": 80
},
{
"name": "wp_archives",
"match": {
"path": {
"pattern": "^/(category|tag|author|[0-9]{4}/)"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "wp_homepage",
"match": {
"path": "/"
},
"action": {
"ttl": "5m"
},
"priority": 60
},
{
"name": "woo_shop",
"match": {
"path": {
"pattern": "^/shop(/|$)"
}
},
"action": {
"ttl": "5m"
},
"priority": 70
},
{
"name": "woo_category",
"match": {
"path": {
"pattern": "^/product-category/"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "woo_tag",
"match": {
"path": {
"pattern": "^/product-tag/"
}
},
"action": {
"ttl": "10m"
},
"priority": 70
},
{
"name": "no_cache_errors",
"match": {
"status": [
400,
401,
403,
404,
500,
502,
503,
504
]
},
"action": "pass",
"priority": 200
},
{
"name": "no_cache_redirects",
"match": {
"status": [
301,
302,
303,
307,
308
]
},
"action": "pass",
"priority": 200
}
]
}
}
Drupal¶
Qualification: configuration example only; no live integration qualification is established here.
Native Cache Tag Integration
This example expects the origin to emit X-Drupal-Cache-Tags with space-separated tags. Configure and verify the appropriate Drupal cache-tag/response integration; parser acceptance does not establish that those headers are emitted or invalidations delivered. This template handles admin, user, node editing, batch operations, and JSON:API routes.
{
"license": {
"path": "/etc/trident/license.key"
},
"server": {
"listeners": [
{
"address": "0.0.0.0:8080",
"protocol": "http1"
}
]
},
"cache": {
"tags": {
"separator": " ",
"headers": [
"X-Drupal-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": "drupal",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"drupal"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "drupal_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "drupal_user",
"match": {
"path": {
"pattern": "^/user"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "drupal_node_edit",
"match": {
"path": {
"pattern": "/node/\\d+/edit"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "drupal_batch",
"match": {
"path": "/batch"
},
"priority": 107,
"action": "pass"
},
{
"name": "drupal_session",
"match": {
"header": {
"Cookie": {
"pattern": "SESS[a-z0-9]+"
}
}
},
"priority": 109,
"action": "pass"
}
],
"response": [
{
"name": "drupal_files",
"match": {
"path": {
"pattern": "^/sites/default/files/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_core",
"match": {
"path": {
"pattern": "^/core/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_modules",
"match": {
"path": {
"pattern": "^/modules/"
}
},
"priority": 102,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_themes",
"match": {
"path": {
"pattern": "^/themes/"
}
},
"priority": 103,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_jsonapi",
"match": {
"path": {
"pattern": "^/jsonapi/"
},
"method": [
"GET"
]
},
"priority": 108,
"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-Drupal-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": "drupal",
"host": "127.0.0.1",
"port": 9000
}
],
"directors": [
{
"name": "default",
"backends": [
"drupal"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "drupal_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "drupal_user",
"match": {
"path": {
"pattern": "^/user"
}
},
"priority": 105,
"action": "pass"
},
{
"name": "drupal_node_edit",
"match": {
"path": {
"pattern": "/node/\\d+/edit"
}
},
"priority": 106,
"action": "pass"
},
{
"name": "drupal_batch",
"match": {
"path": "/batch"
},
"priority": 107,
"action": "pass"
},
{
"name": "drupal_session",
"match": {
"header": {
"Cookie": {
"pattern": "SESS[a-z0-9]+"
}
}
},
"priority": 109,
"action": "pass"
}
],
"response": [
{
"name": "drupal_files",
"match": {
"path": {
"pattern": "^/sites/default/files/"
}
},
"priority": 100,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_core",
"match": {
"path": {
"pattern": "^/core/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_modules",
"match": {
"path": {
"pattern": "^/modules/"
}
},
"priority": 102,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_themes",
"match": {
"path": {
"pattern": "^/themes/"
}
},
"priority": 103,
"action": {
"ttl": "30d"
}
},
{
"name": "drupal_jsonapi",
"match": {
"path": {
"pattern": "^/jsonapi/"
},
"method": [
"GET"
]
},
"priority": 108,
"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"
}
}
Strapi¶
Qualification: configuration example only; no live integration qualification is established here.
Headless CMS API Caching
Strapi is a headless CMS that exposes content through REST and GraphQL APIs. This template caches API and GraphQL GET requests while bypassing authentication and user management endpoints. Uploaded media assets receive long TTLs.
{
"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": "strapi",
"host": "127.0.0.1",
"port": 1337
}
],
"directors": [
{
"name": "default",
"backends": [
"strapi"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "strapi_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "strapi_auth",
"match": {
"path": {
"pattern": "^/api/auth/"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "strapi_users",
"match": {
"path": {
"pattern": "^/api/users/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "strapi_uploads",
"match": {
"path": {
"pattern": "^/uploads/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "strapi_api",
"match": {
"path": {
"pattern": "^/api/"
},
"method": [
"GET"
]
},
"priority": 102,
"action": {
"ttl": "15m"
}
},
{
"name": "strapi_graphql",
"match": {
"path": "/graphql",
"method": [
"GET"
]
},
"priority": 103,
"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": "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": "strapi",
"host": "127.0.0.1",
"port": 1337
}
],
"directors": [
{
"name": "default",
"backends": [
"strapi"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "strapi_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "strapi_auth",
"match": {
"path": {
"pattern": "^/api/auth/"
}
},
"priority": 104,
"action": "pass"
},
{
"name": "strapi_users",
"match": {
"path": {
"pattern": "^/api/users/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "strapi_uploads",
"match": {
"path": {
"pattern": "^/uploads/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "strapi_api",
"match": {
"path": {
"pattern": "^/api/"
},
"method": [
"GET"
]
},
"priority": 102,
"action": {
"ttl": "15m"
}
},
{
"name": "strapi_graphql",
"match": {
"path": "/graphql",
"method": [
"GET"
]
},
"priority": 103,
"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": "30m",
"max": "30d"
}
}
Ghost¶
Qualification: configuration example only; no live integration qualification is established here.
Blog-Optimized Caching
Ghost is a publishing platform focused on content delivery. This template caches theme assets, uploaded content, RSS feeds, and sitemaps with appropriate TTLs. The admin panel and member-only pages are 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": "ghost",
"host": "127.0.0.1",
"port": 2368
}
],
"directors": [
{
"name": "default",
"backends": [
"ghost"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "ghost_admin",
"match": {
"path": {
"pattern": "^/ghost/"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "ghost_members",
"match": {
"path": {
"pattern": "^/members/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "ghost_assets",
"match": {
"path": {
"pattern": "^/assets/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "ghost_content",
"match": {
"path": {
"pattern": "^/content/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
},
{
"name": "ghost_public",
"match": {
"path": {
"pattern": "^/public/"
}
},
"priority": 103,
"action": {
"ttl": "30d"
}
},
{
"name": "ghost_api",
"match": {
"path": {
"pattern": "^/ghost/api/"
},
"method": [
"GET"
]
},
"priority": 104,
"action": {
"ttl": "5m"
}
},
{
"name": "ghost_rss",
"match": {
"path": "/rss/"
},
"priority": 106,
"action": {
"ttl": "15m"
}
},
{
"name": "ghost_sitemap",
"match": {
"path": {
"pattern": "/sitemap.*\\.xml"
}
},
"priority": 107,
"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": "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": "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": "ghost",
"host": "127.0.0.1",
"port": 2368
}
],
"directors": [
{
"name": "default",
"backends": [
"ghost"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "ghost_admin",
"match": {
"path": {
"pattern": "^/ghost/"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "ghost_members",
"match": {
"path": {
"pattern": "^/members/"
}
},
"priority": 105,
"action": "pass"
}
],
"response": [
{
"name": "ghost_assets",
"match": {
"path": {
"pattern": "^/assets/"
}
},
"priority": 101,
"action": {
"ttl": "30d"
}
},
{
"name": "ghost_content",
"match": {
"path": {
"pattern": "^/content/"
}
},
"priority": 102,
"action": {
"ttl": "7d"
}
},
{
"name": "ghost_public",
"match": {
"path": {
"pattern": "^/public/"
}
},
"priority": 103,
"action": {
"ttl": "30d"
}
},
{
"name": "ghost_api",
"match": {
"path": {
"pattern": "^/ghost/api/"
},
"method": [
"GET"
]
},
"priority": 104,
"action": {
"ttl": "5m"
}
},
{
"name": "ghost_rss",
"match": {
"path": "/rss/"
},
"priority": 106,
"action": {
"ttl": "15m"
}
},
{
"name": "ghost_sitemap",
"match": {
"path": {
"pattern": "/sitemap.*\\.xml"
}
},
"priority": 107,
"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": "1h",
"max": "30d"
}
}
Payload CMS¶
Qualification: configuration example only; no live integration qualification is established here.
Node.js Headless CMS
Payload CMS is a TypeScript-first headless CMS. This template caches REST API and GraphQL GET requests along with media assets. The admin panel and user authentication endpoints are bypassed to ensure sessions work correctly.
{
"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": "payload",
"host": "127.0.0.1",
"port": 3000
}
],
"directors": [
{
"name": "default",
"backends": [
"payload"
],
"strategy": "round_robin"
}
],
"rules": {
"request": [
{
"name": "payload_admin",
"match": {
"path": {
"pattern": "^/admin"
}
},
"priority": 100,
"action": "pass"
},
{
"name": "payload_auth",
"match": {
"path": {
"pattern": "^/api/users/"
}
},
"priority": 104,
"action": "pass"
}
],
"response": [
{
"name": "payload_api",
"match": {
"path": {
"pattern": "^/api/"
},
"method": [
"GET"
]
},
"priority": 101,
"action": {
"ttl": "15m"
}
},
{
"name": "payload_graphql",
"match": {
"path": "/api/graphql",
"method": [
"GET"
]
},
"priority": 102,
"action": {
"ttl": "15m"
}
},
{
"name": "payload_media",
"match": {
"path": {
"pattern": "^/media/"
}
},
"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": "30m",
"max": "30d"
}
}