setono/twig-cache-purger-bundle
A Symfony bundle that keeps your Twig cache fresh by purging compiled templates automatically—on deploy or when templates change—so you never serve stale markup or manually clear cache directories again. Drop-in integration through Symfony's cache purger contracts.
view:clear is fast and deploys already invalidate compiled Blade. Treat this repo as a reference design, not a dependency.Consider it when:
Look elsewhere when:
debug is on in the relevant environment — Twig already re-checks template timestamps and reloads changed templates; you gain nothing.Twig\Cache\CacheInterface, cache tagging, or a build-time dependency map instead.One line for executives: A small, MIT-licensed utility that lets us invalidate a single compiled Twig template instead of clearing the entire template cache — reducing deploy risk and cold-cache slowdowns, at effectively zero license cost.
For engineering: It's a thin Symfony bundle around Twig's deterministic cache-key convention. Integration is small (register the bundle, inject a purger service, call it from your existing invalidation path). We can vendor it or reimplement in under a day with tests; either way the correctness risk is low because the cache key is documented Twig behavior.
Honest framing of the risk: It's unproven — no stars, no dependents, single maintainer, and the release metadata needs verification before we rely on it. That is not disqualifying for a ~100-line utility, but it is a reason not to make it load-bearing infrastructure. Recommendation: treat it as a reference implementation and pattern, not a strategic dependency. Pilot it on Symfony if we have a demonstrated template-cache pain point; skip it entirely on Laravel, where the concept doesn't map and the problem usually doesn't exist.
How can I help you explore Laravel packages today?