ezsystems/ezplatform-http-cache
Symfony bundle providing advanced HTTP cache handling for Ibexa DXP (formerly eZ Platform). Adds caching features and tooling to improve performance and cache control. Intended for use within an Ibexa DXP installation.
ezsystems/ezplatform-http-cache package is designed for HTTP caching in Ibexa DXP (formerly eZ Platform), leveraging Varnish for edge caching. It integrates with Symfony-based applications, making it a strong fit for Laravel applications (via Symfony bridge or custom adapters) requiring HTTP-level caching (e.g., CDN, reverse proxy caching).Vary, Authorization, Cookie).HttpFoundation, HttpKernel), which Laravel already uses.HttpKernel and EventDispatcher means Laravel integration will require:
Laravel\SymfonyBridge or custom bindings).kernel.response event to modify responses before caching.| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Symfony Dependency | High (Laravel lacks native Symfony event system). | Use symfony/http-kernel + custom middleware to bridge events. |
| Varnish Lock-in | Medium (core logic is Varnish-specific). | Abstract Varnish logic into interfaces for swappable backends. |
| Cache Invalidation | Low (translation-aware invalidation is a strength). | Ensure Laravel’s cache tags align with HTTP cache tags (e.g., cache:tags). |
| Performance Overhead | Low (Varnish offloads work; risk is in middleware latency). | Benchmark middleware impact; consider async invalidation. |
| License Compliance | Medium (dual GPL/Ibexa BUL license). | Ensure compliance if using in proprietary projects (Ibexa BUL requires subscription). |
posts:123) map to HTTP cache tags (e.g., Content-Type:123)?symfony/http-kernel to replicate Symfony’s HttpKernelInterface.Laravel\SymfonyBridge for event dispatching.Request object.kernel.response events.X-Ibexa-Cache-Tag).HttpCacheBackendInterface).| Phase | Task | Tools/Dependencies |
|---|---|---|
| Assessment | Audit current caching strategy (opcode, Redis, etc.). | Laravel Debugbar, Blackfire |
| Proof of Concept | Integrate Symfony’s HttpCache in a Laravel middleware. |
symfony/http-kernel, symfony/event-dispatcher |
| Varnish Setup | Configure Varnish as a reverse proxy (or use Cloudflare). | Varnish 7, ezplatform-http-cache config |
| Invalidation Sync | Sync Laravel’s cache:tags with HTTP cache invalidation. |
Custom event listeners |
| Testing | Validate cache hits/misses, invalidation, and edge cases (e.g., logged-in users). | PestPHP, Laravel Dusk |
| Optimization | Benchmark performance; adjust TTLs, ESI includes. | Blackfire, New Relic |
| Deployment | Roll out in stages (e.g., non-critical routes first). | Feature flags, canary releases |
HttpFoundation (v5.4+), HttpKernel (v5.4+), EventDispatcher.ezplatform-http-cache.Cache-Control, Vary, and Surrogate-Key headers.cache:tags with HTTP cache invalidation.X-Cache-Status headers).ezplatform-http-cache version bumps.Vary headers) must be documented and version-controlled.varnishlog, curl -I, and Laravel’s dd() for debugging.How can I help you explore Laravel packages today?