alengo/sulu-http-cache-bundle
alengo/sulu-http-cache-bundle targets HTTP caching optimizations for Sulu CMS (Symfony-based) by:
?utm_source) to avoid cache pollution.HttpCacheStore). Fits seamlessly into Sulu’s architecture, which is Symfony-based.HttpCache middleware) and reverse proxies (Varnish/Nginx). Requires minimal changes to existing caching strategies.kernel.request, kernel.response).sulu_http_cache in config/packages/ and configure proxy rules.sulu_http_cache:
tracking_params: ['utm_source', 'utm_medium'] # Strip these
proxy_cookies: ['_ga', 'marketing_attribution'] # Handle at proxy
| Risk | Mitigation |
|---|---|
| Proxy Misconfiguration | Validate proxy rules (e.g., Varnish VCL) before deployment. |
| Cache Invalidation | Ensure stripped params don’t break existing cache tags (e.g., ESI includes). |
| Cookie Handling | Test edge cases (e.g., cookie expiration, domain restrictions). |
| Sulu Version Drift | Monitor Sulu’s Symfony version support; may need backports. |
| Performance Overhead | Benchmark with/without bundle to confirm caching improvements. |
proxy_cache.HttpCache or Varnish cache.composer require alengo/sulu-http-cache-bundle
config/bundles.php.sulu_http_cache in config/packages/sulu_http_cache.yaml.sub vcl_deliver {
if (obj.http.X-Sulu-Cache-Stripped) {
unset beresp.http.Set-Cookie; // Let bundle handle cookies
}
}
SuluHttpCacheEventSubscriber for param stripping.curl or varnishlog.proxy_cache_key and add_header directives.README or wiki.SuluHttpCacheEvents for troubleshooting (e.g., kernel.response).varnishlog, Nginx error logs) for edge issues.wrk).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Proxy misconfiguration | Broken cookie handling | Canary deploy proxy rules. |
| Bundle disabled | Tracking params leak into cache | Fallback: Manual param stripping in middleware. |
| Symfony upgrade conflict | Bundle incompatibility | Test in staging; fork if needed. |
| Cookie injection errors | Marketing data loss | Log errors; alert team. |
| Cache stampede | Increased backend load | Adjust Varnish ban rules. |
Cache-Control headers).How can I help you explore Laravel packages today?