QuestionQ44

VerifiedAdobe Commerce Architecture and Customization Techniques

An Adobe Commerce developer created a before plugin for the save() function in the Magento\Framework\App\Cache\Proxy class. The plugin is intended to add a prefix to all cache identifiers that meet certain criteria.

Why does the plugin fail to execute as expected?

Explanation

Adobe Commerce does not apply plugins to objects that implement Magento\Framework\ObjectManager\NoninterceptableInterface. Magento\Framework\App\Cache\Proxy is such a non-interceptable proxy, so a before plugin on its save() method is not executed.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!