Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances cache management across the CLI and Panel by unifying cache-clearing logic, adding support for clearing the config cache, and improving user-facing feedback and logging.
Changes:
- Refactors CLI (
CacheCommand) and Panel (CacheController) cache clearing to use a shared “clear multiple cache types” approach. - Adds config cache clearing support via a shared
ConfigServiceLoader::clearCache()implementation. - Updates the Panel dashboard UI and translations to expose “clear config cache” and “clear all caches” actions.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| panel/views/dashboard/index.php | Adds new dashboard dropdown actions for clearing config cache and all caches. |
| panel/src/ts/components/views/dashboard.ts | Wires new dashboard actions to POST the appropriate cache-clear requests. |
| formwork/src/Services/Loaders/ConfigServiceLoader.php | Centralizes config cache path and introduces clearCache() helper. |
| formwork/src/Panel/Controllers/CacheController.php | Adds multi-cache clearing (pages/images/config) and logging for Panel-triggered operations. |
| formwork/src/Commands/CacheCommand.php | Adds multi-cache clearing (pages/images/config) and CLI logging. |
| panel/translations/en.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/de.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/el.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/es.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/fr.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/hu.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/it.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/nl.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/pl.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/pt.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/ro.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/ru.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/sv.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/tr.yaml | Adds new translation strings for config/all cache operations. |
| panel/translations/uk.yaml | Adds new translation strings for config/all cache operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances cache management across both CLI and Panel interfaces by introducing unified cache clearing logic, adding support for clearing the config cache, and improving logging and user feedback. It also updates translations to support new cache operations.
Cache clearing logic and features:
CacheCommand(CLI) andCacheController(Panel) to use a newclearCachesmethod, allowing multiple cache types (pages, images, config) to be cleared in a single call. (formwork/src/Commands/CacheCommand.phpL106-R127, Fa742de5L22R64)clearCachemethod inConfigServiceLoaderfor consistent cache directory handling. [1] [2] [3] Fa742de5L101R101)Logging and feedback improvements:
Internationalization: