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

Rule: Modules should not use cacheable="false" #29

Open
larsroettig opened this issue May 13, 2018 · 2 comments
Open

Rule: Modules should not use cacheable="false" #29

larsroettig opened this issue May 13, 2018 · 2 comments

Comments

@larsroettig
Copy link
Contributor

Doc:
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cache/page-caching.html

Do not configure content pages (i.e., catalog, product, and CMS pages) to be uncacheable. Doing so has an adverse affect on performance.

@jissereitsma jissereitsma changed the title Modules should not use cacheable="false" Rule: Modules should not use cacheable="false" May 14, 2018
@schmengler
Copy link
Collaborator

Since it's hard to determine if a block is used on a content page eventually, a warning about any cachable=false occurence makes sense, given the potential impact.

@tdgroot
Copy link

tdgroot commented Jun 12, 2018

One of the steps in our bitbucket-pipelines.yml is:

- echo ! grep -r --include=*.xml --exclude=checkout_*.xml 'cacheable=\"false\"' app/ | sh

This command will give error when it finds a cachable="false" in any xml file.

Anyway, it would be great if this check gets added to the suite. @schmengler does this suite parse xml files as well?

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

3 participants