PHPackages                             bydn/improved-page-cache - 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. bydn/improved-page-cache

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

bydn/improved-page-cache
========================

Improved Page Cache

1.0.4(3mo ago)184↓78.6%1[2 issues](https://github.com/danidnm/ByDN-Magento-Improved-Page-Cache/issues)MITPHPPHP &gt;=8.1

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/danidnm/ByDN-Magento-Improved-Page-Cache)[ Packagist](https://packagist.org/packages/bydn/improved-page-cache)[ RSS](/packages/bydn-improved-page-cache/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

Magento 2 Improved Page Cache Extension
=======================================

[](#magento-2-improved-page-cache-extension)

This Magento 2 extension provides an advanced mechanism for warming and managing the page cache (Varnish or Built-in cache). It allows for efficient, priority-based cache warming across multiple store views, ensuring that your customers always experience fast page load times.

With features like parallel processing, detailed monitoring in the admin panel, and flexible enqueueing options via console commands, this extension is designed to handle high-traffic stores and complex cache management needs.

Features
--------

[](#features)

- **Smart Cache Refresh Strategy**: Intercepts massive cache purges and enqueues them for background warming, preventing performance drops during product or category updates.
- **Manual Enqueueing**: Warm cache for home page, categories, products, CMS pages, or specific URLs.
- **Priority Management**: Assign priority levels (1-5) to warming tasks to ensure critical pages are cached first.
- **Parallel Processing**: Configurable concurrency levels to speed up the warming process.
- **Automated Cron Jobs**: Scheduled tasks for regular cache warming, cleanup of old records, and statistics generation.
- **Admin Monitoring**: A dedicated grid in the backoffice to track the status, processing time, and results of each warming item.
- **Store-specific Warming**: Full support for multi-store environments, ensuring correct URL generation and warming per store.

Installation
============

[](#installation)

Run:

```
composer require bydn/improved-page-cache
./bin/magento module:enable Bydn_ImprovedPageCache
./bin/magento setup:upgrade
```

Configuration
=============

[](#configuration)

Access the configuration by going to:

```
Stores => Configuration => AI Extensions (by DN) => Improved Page Cache.

```

General Configuration
---------------------

[](#general-configuration)

- Enabled. This option allows you to completely enable or disable the extension.
- Concurrency Level. Set the number of simultaneous parallel requests during the warming process (default: 5).
- Cleanup Old Records (Days). Automatically delete warm records older than the specified number of days (default: 7).

Smart Cache Refresh
===================

[](#smart-cache-refresh)

One of the core advantages of this module is its **Optimized Refresh Strategy**.

Standard Magento behavior often triggers massive, resource-intensive cache purges—for example, clearing every single category page associated with a product when that product is updated. This can lead to significant performance spikes and a degraded user experience.

This module intercepts these massive purge requests. Instead of performing a destructive multi-page deletion, it adds the affected URLs to the **Warming Queue**. Supported by our intelligent priority system, the refresh happens almost instantly in the background. Your customers will always see fresh content without ever experiencing a slow or uncached website.

Varnish Configuration
---------------------

[](#varnish-configuration)

To take full advantage of this feature, you must update your Varnish VCL configuration. Add the following logic at the beginning of the `vcl_recv` function:

```
if (req.http.X-Magento-Cache-Refresh) {
    set req.hash_always_miss = true;
}
```

This tells Varnish to fetch a fresh version and replace the cached one whenever the module triggers a refresh request.

Usage
=====

[](#usage)

Console Commands
----------------

[](#console-commands)

The extension provides two main console commands for managing the cache warming queue manually.

### Enqueueing Items

[](#enqueueing-items)

Use `bydn:cache:enqueue` to add items to the warming queue.

**Examples:**

- Warm home page for store 1: ```
    php bin/magento bydn:cache:enqueue --stores 1 --type home
    ```
- Warm all products for store 1 with high priority: ```
    php bin/magento bydn:cache:enqueue --stores 1 --type products --ids all --priority 5
    ```
- Warm specific categories: ```
    php bin/magento bydn:cache:enqueue --stores 1 --type categories --ids 10,11,12
    ```
- Warm a specific URL: ```
    php bin/magento bydn:cache:enqueue --stores 1 --type url --url "https://example.com/custom-page"
    ```

### Processing the Queue

[](#processing-the-queue)

While cron jobs typically handle the queue, you can manually trigger the warming process:

```
php bin/magento bydn:cache:warm
```

You can also filter by minimum priority:

```
php bin/magento bydn:cache:warm --priority 3
```

Admin Monitoring
----------------

[](#admin-monitoring)

You can track the progress and results of the cache warming tasks in the admin panel.

Go to:

```
System => Tools => Cache Warming.

```

[![Cache Warm Stats](https://github.com/danidnm/ByDN-Magento-Improved-Page-Cache/raw/master/docs/stats.jpg)](https://github.com/danidnm/ByDN-Magento-Improved-Page-Cache/blob/master/docs/stats.jpg)

On this screen, you can see:

- **URL**: The specific URL being warmed.
- **Status**: Current status (Pending, Processing, Done, Error).
- **Processing Time**: How long each request took.
- **HTTP Code**: The result of the warming request (e.g., 200 OK).
- **Priority**: The priority level of the item.

Automated Tasks (Cron)
----------------------

[](#automated-tasks-cron)

The extension includes a dedicated cron group `cachewarm` with several jobs:

- `bydn_improvedpagecache_warm`: Processes the standard queue every minute.
- `bydn_improvedpagecache_warm_priority`: Processes priority items every minute.
- `bydn_improvedpagecache_cleanup`: Cleans up old records daily.
- `bydn_improvedpagecache_stats`: Updates warming statistics.

To run the cache warming cron separately, you can use:

```
./bin/magento cron:run --group cachewarm
```

Having Problems?
================

[](#having-problems)

Contact me at soy at solodani.com

License
=======

[](#license)

This Magento 2 extension was created and is maintained by Daniel Navarro ().

If you fork, modify, or redistribute this extension, please:

- Keep the code free and open source under the same GPL-3.0 license.
- Mention the original author in your README or composer.json.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance63

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

111d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/130283670?v=4)[Daniel Navarro](/maintainers/danidnm)[@danidnm](https://github.com/danidnm)

---

Top Contributors

[![danidnm](https://avatars.githubusercontent.com/u/130283670?v=4)](https://github.com/danidnm "danidnm (80 commits)")

### Embed Badge

![Health badge](/badges/bydn-improved-page-cache/health.svg)

```
[![Health](https://phpackages.com/badges/bydn-improved-page-cache/health.svg)](https://phpackages.com/packages/bydn-improved-page-cache)
```

###  Alternatives

[barryvdh/laravel-httpcache

HttpCache for Laravel

502404.4k10](/packages/barryvdh-laravel-httpcache)

PHPackages © 2026

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