PHPackages                             mage/fpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. mage/fpc

ActiveMagento2-module[Caching](/categories/caching)

mage/fpc
========

10019(9mo ago)8728219[6 issues](https://github.com/Genaker/FastFPC/issues)[1 PRs](https://github.com/Genaker/FastFPC/pulls)proprietaryGo

Since Feb 8Pushed 3mo ago7 watchersCompare

[ Source](https://github.com/Genaker/FastFPC)[ Packagist](https://packagist.org/packages/mage/fpc)[ RSS](/packages/mage-fpc/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)DependenciesVersions (21)Used By (0)

FastFPC
=======

[](#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*

```
#RHEL / CentOS
#Installation of the php-pecl-redis package, from the EPEL repository:

yum install php-pecl-redis

```

Cloud Flare CDN FPC Cache Microservice Layer
--------------------------------------------

[](#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](https://github.com/Genaker/CloudFlare_FPC_Worker)

The Idea behind this Magento 2 FPC performance extension
--------------------------------------------------------

[](#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 the right PHP way! Symfony Http cache! 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
------------

[](#installation)

Nginx

```
fastcgi_param PHP_VALUE "auto_prepend_file=/var/www/html/magento/app/code/Mage/FPC/FPC.php";

```

/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.

```
require "../app/code/Mage/FPC.php";

```

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:

```
composer require mage/fpc
bin/magento setup:upgrade
bin/magento fpc:deploy

```

Performance
===========

[](#performance)

FPC generation time is 0.000481128 second.

Test
====

[](#test)

Test Magento Headers:

[![image](https://private-user-images.githubusercontent.com/9213670/408969583-52656300-096c-4e9c-8900-1f5bd9b1c882.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzgzODU4MjMsIm5iZiI6MTc3ODM4NTUyMywicGF0aCI6Ii85MjEzNjcwLzQwODk2OTU4My01MjY1NjMwMC0wOTZjLTRlOWMtODkwMC0xZjViZDliMWM4ODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDUxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA1MTBUMDM1ODQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mzk3MzBiZDU0YmY5NzgyZTY2NDlmNTYyMjAwMjcwNzVkOTlmM2FiM2I1MzBlZmE5ODFkMTE4MzcwZjZkMGVmYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.VfranrjdLKlZdQSdfOL-gtSKzX2Hb4oxoXblYWZuDWo)](https://private-user-images.githubusercontent.com/9213670/408969583-52656300-096c-4e9c-8900-1f5bd9b1c882.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzgzODU4MjMsIm5iZiI6MTc3ODM4NTUyMywicGF0aCI6Ii85MjEzNjcwLzQwODk2OTU4My01MjY1NjMwMC0wOTZjLTRlOWMtODkwMC0xZjViZDliMWM4ODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDUxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA1MTBUMDM1ODQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mzk3MzBiZDU0YmY5NzgyZTY2NDlmNTYyMjAwMjcwNzVkOTlmM2FiM2I1MzBlZmE5ODFkMTE4MzcwZjZkMGVmYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.VfranrjdLKlZdQSdfOL-gtSKzX2Hb4oxoXblYWZuDWo)
In this case, we need install php-redis extension: ``` sudo apt-get install php-redis ``` NodeJS implementation
=====================

[](#nodejs-implementation)

```
npm install ioredis node-cache dotenv
or nmp install
node FPC.js

```

Replace Nginx:

```
location / {
    try_files $uri $uri/ /index.php$is_args$args;
}

```

With:

```
# Try Node.js first, fallback to static files, then PHP
location / {
    # Try serving from Node.js first
    proxy_pass http://127.0.0.1:3001;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    # If Node.js fails, fallback to static files and then PHP
    error_page 406 502 504 = @fallback;
}

# Fallback to Static Files or PHP if Node.js Fails
location @fallback {
    try_files $uri $uri/ /index.php$is_args$args;
}

```

Understanding Stale-While-Revalidate
====================================

[](#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 :
==================

[](#performance-test-)

```
FPC-TIME:0.88ms
FPC-TIME:0.99ms
FPC-TIME:0.79ms
FPC-TIME:0.98ms
FPC-TIME:1.51ms
FPC-TIME:1.08ms
FPC-TIME:0.98ms

```

With in-memory cache:

```
FPC-TIME:0.25ms
FPC-TIME:0.22ms
FPC-TIME:0.23ms
FPC-TIME:0.62ms
FPC-TIME:0.24ms
FPC-TIME:0.46ms
FPC-TIME:0.42ms
FPC-TIME:0.29ms
FPC-TIME:0.28ms
FPC-TIME:/->0.14ms
FPC-TIME:/->0.15ms
FPC-TIME:/->0.14ms
FPC-TIME:/->0.15ms
FPC-TIME:0.25ms
FPC-TIME:0.22ms
FPC-TIME:0.20ms

```

Magento GO FPC (Full Page Cache)
================================

[](#magento-go-fpc-full-page-cache)

A high-performance caching solution for Magento built with Go, featuring multi-layer caching, goroutines for concurrent processing, and Redis integration.&lt;\\br&gt;

Features:

- Multi-layer caching (Local memory + Redis)
- Concurrent request handling with goroutines
- Rate limiting (250 req/s with 500 burst)
- Stale cache management
- Profiling and monitoring
- Gzip compression support
- Static file caching
- Debug mode with detailed logging

Running the Server
------------------

[](#running-the-server)

```
# Build the binary
go build -o fpc FPC.go

# Run the server
./fpc

# Or run directly
go run FPC.go

```

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance69

Regular maintenance activity

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Recently: every ~42 days

Total

17

Last Release

282d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2614da2cb514a3749cd296d237c9ca3430f4dafa09b4e49e338a6b1794a5acf4?d=identicon)[genaker](/maintainers/genaker)

---

Top Contributors

[![Genaker](https://avatars.githubusercontent.com/u/9213670?v=4)](https://github.com/Genaker "Genaker (75 commits)")[![yshytikov](https://avatars.githubusercontent.com/u/204256376?v=4)](https://github.com/yshytikov "yshytikov (5 commits)")

---

Tags

adobeecommercemagentovarnishvarnish-cache

### Embed Badge

![Health badge](/badges/mage-fpc/health.svg)

```
[![Health](https://phpackages.com/badges/mage-fpc/health.svg)](https://phpackages.com/packages/mage-fpc)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
