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

Full Page Cache Logic in Catalog Module #962

Closed
sshymko opened this issue Jan 13, 2015 · 6 comments
Closed

Full Page Cache Logic in Catalog Module #962

sshymko opened this issue Jan 13, 2015 · 6 comments
Assignees
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@sshymko
Copy link

sshymko commented Jan 13, 2015

Classes Magento\Catalog\Plugin\Model\Indexer\Category\Product\Execute and Magento\Catalog\Plugin\Model\Resource\Attribute\Save implement flushing the Full Page Cache. They should belong to the Magento_PageCache module, not the Magento_Catalog. Utilization of the constant Magento\PageCache\Model\Cache\Type::TYPE_IDENTIFIER rather than literal full_page would expose that dependency on the code level.

@orlangur
Copy link
Contributor

They should belong to the PageCache module, not the Catalog

This suggestion is wrong. PageCache module composed in such a way would contradict to "true modularity": the intention to have granular and loosely coupled system components.

PageCache module in Magento 2 introduces common mechanism for any other module to implement page caching. It must not contain any domain-specific logic.

Other modules, like Catalog, may involve this mechanism and implement their own page caching domain-specific logic. Thus Catalog module should have soft dependency on PageCache meaning that caching ability is optional: if PageCache module is present it works and if no nothing bad happens.

Surely, it is possible to go even further and implement such caching as separate module like CatalogPageCache. Or collect caching for a bunch of modules in one with no other module depending on this new module. But, again, such code must not be placed in PageCache module itself.

@sshymko
Copy link
Author

sshymko commented Jan 14, 2015

Correct, if a dependency of Catalog on PageCache is permitted, than implementation is correct except for implicit reference to the Full Page Cache constant. Good job on breaking down the monolithic FPC module, didn't notice it at first!

@sshymko
Copy link
Author

sshymko commented Jan 14, 2015

Still, constant Magento\PageCache\Model\Cache\Type::TYPE_IDENTIFIER needs to be used to make dependency explicit.

@orlangur
Copy link
Contributor

No objections on this from my side. Catalog already depends on PageCache due to classes used anyway.

This dependency is logically soft but declared as hard because there is no way to tell "I use classes of some module in plugins only" in dependency declaration currently.

@verklov
Copy link
Contributor

verklov commented Jan 23, 2015

MAGETWO-33021

@vpelipenko vpelipenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS and removed TECH labels Feb 17, 2015
@vkorotun vkorotun removed the PS label Aug 4, 2016
@piotrekkaminski
Copy link
Contributor

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

magento-team pushed a commit that referenced this issue Dec 11, 2017
 - Merge Pull Request magento-engcom/magento2ce#962 from nmalevanec/magento2:7467
 - Merged commits:
   1. b42712e
magento-team pushed a commit that referenced this issue Dec 11, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-85332: Fix error loading theme configuration on PHP 7.2 #12606
 - MAGETWO-85307: 12468: Sort by Price not working on CatalogSearch Page in Magento 2 #929
 - MAGETWO-85303: #12582: Can't remove item description from wishlist #981
 - MAGETWO-85297: 8410: Custom Checkout Step and Shipping Step are Highlighted and Combined upon Checkout page load #975
 - MAGETWO-85290: 7467: File Put Contents file with empty content. #962
magento-engcom-team added a commit that referenced this issue Oct 2, 2019
 - Merge Pull Request magento/graphql-ce#962 from sergiy-v/graphql-ce:877-rename-order-id-for-order-type
 - Merged commits:
   1. 542395b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

8 participants