mage2tv / magento-cache-clean

A faster drop in replacement for bin/magento cache:clean with file watcher
BSD 3-Clause "New" or "Revised" License
527 stars 61 forks source link

Add support for creatuity/magento2-interceptors #108

Closed Vinai closed 11 months ago

Vinai commented 1 year ago

The module https://github.com/creatuity/magento2-interceptors generates some cache records and code. These should be removed as appropriate.

Vinai commented 11 months ago

Observations:

The interceptors in generated/code/ follow the same naming convention as the native Magento ones, so nothing needs to be done in regards to those.

However, some code is also written to generated/staticcache/.

From what I can see it should work like this:

What I’m not yet clear about is if something can happen when a php class is changed.

For example, if a class is changed that is listed in one of those staticcache files, does the cache file need to be removed?
-> I don’t think so.

But when a php class is removed that is listed in one of those files, does the cache file need to be removed? -> 🤷

When a php class is removed that is listed in one of the compiled interceptors in generated/code/, then the interceptor needs to be removed.
However, because removing a plugin also requires removing it from di.xml, that should be handled already.

Vinai commented 11 months ago

Released initial support in 1.0.52. Please open a new issue with details if something isn't working as expected in regards to the creatuity interceptors.