{"id":50988056,"url":"https://github.com/wazum/cache-guard","last_synced_at":"2026-06-19T22:01:49.085Z","repository":{"id":363842090,"uuid":"1264885679","full_name":"wazum/cache-guard","owner":"wazum","description":"Deliberate cache control for TYPO3: lock destructive system-cache flushes in production, and flush individual caches precisely from the CLI.","archived":false,"fork":false,"pushed_at":"2026-06-10T15:01:24.000Z","size":172,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T16:24:19.052Z","etag":null,"topics":["backend","cache","cache-control","cache-management","cli","deployment","php","typo3","typo3-cms","typo3-extension"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wazum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-10T09:10:14.000Z","updated_at":"2026-06-10T15:04:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wazum/cache-guard","commit_stats":null,"previous_names":["wazum/cache-guard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/wazum/cache-guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wazum%2Fcache-guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wazum%2Fcache-guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wazum%2Fcache-guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wazum%2Fcache-guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wazum","download_url":"https://codeload.github.com/wazum/cache-guard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wazum%2Fcache-guard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34549340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","cache","cache-control","cache-management","cli","deployment","php","typo3","typo3-cms","typo3-extension"],"created_at":"2026-06-19T22:01:46.026Z","updated_at":"2026-06-19T22:01:49.077Z","avatar_url":"https://github.com/wazum.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cache Guard\n\n[![Tests](https://github.com/wazum/cache-guard/actions/workflows/ci.yml/badge.svg)](https://github.com/wazum/cache-guard/actions)\n[![PHP](https://img.shields.io/badge/PHP-8.2%20|%208.3%20|%208.4%20|%208.5-blue.svg)](https://www.php.net/)\n[![TYPO3](https://img.shields.io/badge/TYPO3-12.4%20|%2013.4%20|%2014.3-orange.svg)](https://typo3.org/)\n[![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](LICENSE)\n\nDeliberate cache control for TYPO3: **protect** the warmed system caches from destructive backend flushes between deployments, and **flush precisely** the caches you mean to. Editors keep clearing page caches, deployments keep flushing everything, and you can clear a single cache (e.g. `fluid_template`) instead of wiping the whole system group — while the bulk flush of warmed system caches stays locked in production.\n\n## Installation\n\n```bash\ncomposer require wazum/cache-guard\n```\n\nNo setup needed — the defaults lock the `system` cache group in `Production` contexts.\n\n## Locking system-cache flushes\n\nBetween deployments the warmed system caches (compiled PHP code, Fluid templates, l10n, …) should not be wiped by a stray backend click. Cache Guard prevents that in production-like contexts, while everyday page-cache clearing keeps working.\n\n### What it blocks\n\n- Flushing of configured cache groups (default: `system`) in configured application contexts (default: `Production`, matched as prefix, so `Production/Staging` is included).\n- The full opcache reset triggered by \"Flush all caches\"; targeted single-file opcache invalidation keeps working.\n- It replaces the \"Flush all caches\" entry in the clear-cache toolbar with a disabled notice while the lock is active; the dropdown and \"Flush frontend caches\" stay in place.\n\n\u003e [!NOTE]\n\u003e Intercepting the opcache reset requires TYPO3 13.4+ — on 12.4 the cache-group lock applies, but the opcache reset is not intercepted.\n\n![Clear-cache dropdown with the system cache flush locked](Documentation/Images/clear-cache-dropdown.png)\n\n### What it leaves alone\n\n- \"Flush frontend caches\" (pages) keeps working for editors.\n- CLI: `vendor/bin/typo3 cache:flush` always works — deployments are unaffected.\n- The Install Tool / Maintenance \"Flush cache\" and the DI container cache (system-maintainer territory).\n- Tag-based invalidation (`flushCachesByTag`/`flushCachesByTags`) — targeted invalidation is not a bulk clear.\n\n### Configuration\n\nAdmin Tools → Settings → Extension Configuration → cache_guard:\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `lockedGroups` | `system` | Comma-separated cache groups that must not be flushed from the backend |\n| `lockedContexts` | `Production` | Comma-separated application context prefixes in which the lock is active |\n\n### Defense in depth (optional)\n\nHide the \"Flush all caches\" entry per user/group via User TSconfig (UI only, the lock above is the actual enforcement):\n\n```\noptions.clearCache.all = 0\n```\n\n## Flushing individual caches (CLI)\n\nClear only specific caches without wiping a whole group — e.g. recompile Fluid templates after a deployment without touching the warmed PHP-code, l10n or DI caches:\n\n```bash\nvendor/bin/typo3 cache:flush --cache fluid_template\nvendor/bin/typo3 cache:flush --cache fluid_template,l10n\n```\n\nAll identifiers must be valid or nothing is flushed. The dependency injection cache is not flushable this way — use `cache:flush --group di`.\n\nRun the option without a value (or with an unknown name) at a terminal to pick interactively:\n\n```bash\nvendor/bin/typo3 cache:flush --cache\n```\n\n![Interactive cache picker](Documentation/Images/cache-flush-picker.gif)\n\nIn CI and deployment, pass `--no-interaction` (`-n`) so a missing or unknown identifier fails with a clear error instead of opening the picker:\n\n```bash\nvendor/bin/typo3 cache:flush --cache fluid_template --no-interaction\n```\n\n## Requirements\n\n- TYPO3 12.4, 13.4 or 14.3\n- PHP 8.2, 8.3, 8.4 or 8.5 (TYPO3 12.4 runs on 8.2–8.3)\n\n## License\n\nGPL-2.0-or-later — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwazum%2Fcache-guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwazum%2Fcache-guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwazum%2Fcache-guard/lists"}