serfe/module-uncacheableblockdetector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

serfe/module-uncacheableblockdetector

最新稳定版本:1.2.0

Composer 安装命令:

composer require serfe/module-uncacheableblockdetector

包简介

Detects blocks that are uncacheable inside your Magento 2 system

README 文档

README

Latest Stable Version Total Downloads License PHP Version Require

The propouse of this module is to intercept the normal workflow of page rendering of Magento 2 and force the exit the rendering of the page if a block that is uncacheable is reached. If the block is uncacheable, the wholepage get it's cache disabled and cannot be handled by file cache or Varnish cache.

This is usefull to debug any module that might contain the following entry inside one of it's layout definitions (catalog_product_view.xml for example):

  ....
  <block name="thridpartblock" template="Vendor_Modulename::confirm.phtml" cacheable="false">
  ....

In which cases you will see this module required?

This module is good to help troubleshoot when your any page of the system is not having it's cache generated by Magento (in Varnish or in Disk Cache) and you don't know which is the block that is making this behaviour to happen.

Just install this module as developer dependency and configure it from the console or inside the developer section in the backend admin, refresh and see the block name popup as an error on your frontend section.

This only works on development mode. On production mode, this module auto-disable itself to avoid possible issues.

Install

composer install serfe/module-uncheableblockdetector --dev
php bin/magento setup:upgrade

Configuration

The module allow to enable or disable the feature on the backend section when in developer mode.

Go into Backend > Stores > Configuration > Advanced > Developer >

Using the console

If you want to have the setup been done using the console, run the following commands:

Enable the module detection with:

php bin/magento config:set --lock-env dev/cache_detector/enabled 1

To disable the exception throwing on the first block detected:

php bin/magento config:set --lock-env dev/cache_detector/die 0

When using this last option, you will see the detected entries into the debug.log file.

About Us

Serfe develops complete e-commerce solutions based on Magento 2 system and other platforms. Feel free to check it on the website.

Contributing

We welcome any contribution to this module. Fork the repo, make your changes and create a pull request with your changes.

统计信息

  • 总下载量: 135
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2024-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固