Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache usage are not listing all items #26

Open
onlinebizsoft opened this issue Jul 17, 2023 · 3 comments
Open

Cache usage are not listing all items #26

onlinebizsoft opened this issue Jul 17, 2023 · 3 comments

Comments

@onlinebizsoft
Copy link

When we log all cache call from different cache classes, we can collect around 300 cache calls on the page but the tool only show around 40 calls. There should be a document for what this cache usage tab shows to avoid confusion.

@guvra
Copy link
Contributor

guvra commented Jul 17, 2023

Hi,

I just checked, the cache information is properly displayed.

In the "last x executions" tab, are you sure that you selected the execution related to the main page?
The execution selected by default is the latest execution, and it's often an ajax request, not the main page itself.

For example:

debug_toolbar_executions

To see the stats of the main page, I have to select the 4th execution (catalog_category_view).

@onlinebizsoft
Copy link
Author

@guvra yes I'm very clear with that and I view the correct execution correctly
image
image

A lots of cache items are missing for this page for example layout, system config,.......you may double check this cache key which any Magento installation should have APP_ACTION_LIST and it is missing in the cache identifier list

@guvra
Copy link
Contributor

guvra commented Jul 17, 2023

I did some debugging.

Some cache identifiers are not displayed because the plugin of our module is based on Magento\Framework\App\CacheInterface instead of Magento\Framework\Cache\FrontendInterface.

Unfortunately, it's not possible to create a plugin on FrontendInterface.
Adding a plugin on this interface would trigger the following error:

Fatal error: Uncaught LogicException: Circular dependency: Magento\Framework\Interception\PluginList\PluginList depends on Magento\Framework\Interception\PluginList\PluginList and vice versa. in vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 55

This is because the plugin system has a dependency on FrontendInterface.
So adding a plugin on this interface creates an infinite loop.

Additionally, I don't think there's a lot of value to display a list of system cache ids (translations, configs...).
The toolbar already shows if these cache types are enabled or disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants