Add missing cache engine method proxies - #1084
Conversation
|
Looks okay to me, though the DebugEngine appears to wrap the configured cache engines rather than replacing them. Doing this eliminates the call to The stan failures do not appear to be related to this change. @ADmad @dereuromark do either of you have any pointers on what needs to change in this branch to get the baseline back to green? Looks like it has been failing since the dependabot updates on/around August 2nd. |
There was a problem hiding this comment.
Pull request overview
This PR fixes DebugKit’s cache-engine wrapper so that add()/has() calls are properly proxied to the wrapped CakePHP cache engine when the Cache panel is enabled, preventing warnings from the wrapper’s empty internal configuration and restoring correct behavior/telemetry.
Changes:
- Add
DebugEngine::add()proxy to delegate to the wrapped engine while tracking “set” metrics and logging the operation. - Add
DebugEngine::has()proxy to delegate to the wrapped engine while tracking hit/miss metrics and logging the operation. - Extend/adjust DebugEngine tests to cover the new proxy methods and updated metrics/log expectations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Cache/Engine/DebugEngine.php | Adds missing add()/has() proxies so DebugEngine no longer falls back to base implementations that rely on its empty _config. |
| tests/TestCase/Cache/Engine/DebugEngineTest.php | Updates tests to exercise add()/has() and validates updated metrics/log output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
yes that's what I meant, sorry for the poor choice of words! |
|
@micheleprimavera-fattura no worries, didn't mean to nitpick, was just confirming my own understanding. #1085 should correct the stan errors on the base branch, can you rebase yours off of it? That should make the pipeline go green on this branch. |
When the Cache panel is enabled, the engine is wrapped into a DebugEngine, which has an empty configuration. Calling add() or has() on this engine generates a warning on a missing prefix key and overall does nothing.
This fixes #1083