https://github.com/phpro/phpro-mage2-module-bypass-page-cache
Module to bypass to fullpage cache
https://github.com/phpro/phpro-mage2-module-bypass-page-cache
Last synced: 12 months ago
JSON representation
Module to bypass to fullpage cache
- Host: GitHub
- URL: https://github.com/phpro/phpro-mage2-module-bypass-page-cache
- Owner: phpro
- License: mit
- Created: 2020-05-29T13:43:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-12T09:10:22.000Z (about 4 years ago)
- Last Synced: 2025-04-11T15:56:31.347Z (about 1 year ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Bypass Page Cache for Magento 2
In some cases we want to be able to bypass Magento's full page cache. For example, when profiling a page using Blackfire, we want to test the performance of the page without full page cache.
## Installation
`composer require phpro/mage2-module-bypass-page-cache`
## Key features
### Configuration
To use this feature, you have to activate it in the backend
`Stores > Configuration > Advanced > System > Full Page Cache > Enable Full Page Cache Bypass`
This setting is only available when you use the Built-in Cache. This feature is not relevant when you use Varnish.
Note: this is meant to be used on development and staging environments. Make sure this is disabled in production.
### Blackfire
This module was built to be used with Blackfire.
When creating profiles in Blackfire, you need to be able to bypass the full page cache. Magento 2 does not provide an
easy way to bypass the full page cache, so we created this module.
Blackfire adds the header `X-Blackfire-Query` when profiling over HTTP. When this header exists your request, the full
page cache will be ignored.
### Custom header
The module is created to work with the Blackfire header by default. If you want to use this feature, but need a
different header, you can override the default configuration.
Add the following in the file `config.xml` of a project module.
My-Custom-Header