Download the PHP package mage/fpc without Composer
On this page you can find all versions of the php package mage/fpc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package fpc
FastFPC
this extension requires Redis Magento Builtin cache enabled and php_redis php extension installed. The phpredis extension provides a native PHP API for communicating with the Redis key-value store.
Tested With: 2.4.7 Magento version
Cloud Flare CDN FPC Cache Microservice Layer
Works great together with this Cloud Flare Worker FPC cache Layer: https://github.com/Genaker/CloudFlare_FPC_Worker
The Idea behind this Magento 2 FPC performance extension
When I developed a Shopware 6-based website I noticed fast sub 1ms performance of the FPC cache. I checked the code and it amazed me. It is simple and made a right PHP way! You don't need Varnish to run your FPC cache fast. You need just fast code without reusing the Magento 2 junk core framework.
Installation
Nginx
/var/www/html/magento/app/ shuld be changet to your magento path
or
add it as a first line to app/bootstrap.php or pub/index.php
Also if you are using composer to install this stuff your path will be something like : ../vendor/mage/fpc/src/Mage/FPC.php
Installation into the app folder is preferable. It is not a useless library. It is a part of your business to keep your site FAST.
Also, this extension will work without this additional interaction (just install and forget) but it will be slower because it will load all Magento 2 via autoloader.
or do next:
Performance
FPC generation time is 0.000481128 second.
Test
Test Magento Headers:
In this case, we need install php-redis extension:
NodeJS implementation
Replace Nginx:
With:
Understanding Stale-While-Revalidate
The stale-while-revalidate caching strategy is designed to minimize latency by serving cached content immediately, even if it’s slightly outdated, while simultaneously updating the cache with fresh data in the background. This approach ensures that users receive a quick response and the cache remains up-to-date without blocking the main request flow.
Performance Test :
With in-memory cache: