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

_isScopePrivate variables configured making the block not cacheable. #155

Open
almeidarobertop opened this issue Apr 28, 2023 · 1 comment

Comments

@almeidarobertop
Copy link

Preconditions

The following table shows the private content block(s) that have the _isScopePrivate variables configured making the block not cacheable.

Smile/StoreLocator/Block/ContactForm.php

Recommendation
Do not use the _isScopePrivate property in your blocks. This property is obsolete and will not work properly.
Replace _isScopePrivate property by private content instead.

Root Cause
The _isPrivateScope variable is making block(s) not cacheable.

Scenario/Preconditions
Since private content is specific to individual users, it is reasonable to handle this on the client-side (i.e., the web browser) instead of hitting the server for retrieving the same data on each customer request.

Site Impact
Each request to Magento can trigger additional Ajax requests for non-cacheable blocks causing negative site performance.

Magento Version :
2.4.6-Beta1 EE (Cloud Pro)

Module Store Locator Version :
2.1

Environment :
Production

Third party modules :
NA

@almeidarobertop
Copy link
Author

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

1 participant