PHPackages                             samjuk/m2-module-cache-debounce - 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. samjuk/m2-module-cache-debounce

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

samjuk/m2-module-cache-debounce
===============================

Debounce FPC cache purges to a set schedule

v0.0.3(1y ago)121.8k↓13.3%3[1 PRs](https://github.com/SamJUK/m2-module-cache-debounce/pulls)MITPHPPHP ^7.0|^8.0CI failing

Since Nov 6Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/SamJUK/m2-module-cache-debounce)[ Packagist](https://packagist.org/packages/samjuk/m2-module-cache-debounce)[ RSS](/packages/samjuk-m2-module-cache-debounce/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

SamJUK\_CacheDebounce
=====================

[](#samjuk_cachedebounce)

[![Supported Magento Versions](https://camo.githubusercontent.com/19f23e16065b418f3cbbce917f0911b071d1aa3adf93decbab986cd346a79198/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6167656e746f2d322e342e33254532253830253933322e342e382d6f72616e67652e7376673f6c6f676f3d6d6167656e746f)](https://github.com/SamJUK/m2-module-cache-debounce/actions/workflows/ci.yml) [![CI Workflow Status](https://github.com/samjuk/m2-module-cache-debounce/actions/workflows/ci.yml/badge.svg)](https://github.com/SamJUK/m2-module-cache-debounce/actions/workflows/ci.yml) [![GitHub Release](https://camo.githubusercontent.com/a5f95d50cfebd7a2c2473611a824b2c3ce483dffd3a8c921118340149cb28e74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f53616d4a554b2f6d322d6d6f64756c652d63616368652d6465626f756e63653f6c6162656c3d4c617465737425323052656c65617365266c6f676f3d676974687562)](https://github.com/SamJUK/m2-module-cache-debounce/releases)

This module debounces/defers/delays FPC cache purge requests to occur on a set schedule. Allowing you to make a trade off between cache accuracy and backend load.

Particularly useful for a ERP solutions that like to issue significant stock updates, in turn flushing cache regularly especially for common parent categories.

If you require a more aggressive solution, such as disabling Cache Flushes entirely then [Hypershop\_SpikePerformance](https://github.com/hypershopbv/Hypershop_SpikePerformance) might be a better solution for you.

Proof Of Concept
----------------

[](#proof-of-concept)

The module was tested on a fresh Luma store with Sample Data, running on CPX31 VPS (4vCPU, 8GB Memory).

Traffic was generated via a golang based sitemap crawler running back to back.

A stock management integration was mocked by, setting a random QTY on a random Sku every 1 second via the PUT StockItems route.

[![Before and After Metrics for a POC store](./.github/poc.png)](./.github/poc.png)

Installation
------------

[](#installation)

```
composer require samjuk/m2-module-cache-debounce:@dev
php bin/magento setup:upgrade && php bin/magento cache:flush
```

Configuration
-------------

[](#configuration)

Configuration can be handled via System configuration, from within the Cache Debounce menu of the SamJUK Tab.

Or can be set via the CLI with the command

```
php bin/magento config:set
```

OptionConfig PathDefaultDescriptionEnabled`samjuk_cache_debounce/general/enabled``0`Feature flag to toggle functionality of the moduleFlush Schedule`samjuk_cache_debounce/cron/flush_schedule``*/5 0 0 0 0`Cron schedule to run the scheduled flushWill this help my store?
------------------------

[](#will-this-help-my-store)

The performance improvement comes from improving cache performance by reducing the amount of cache purge requests in turn reducing system load.

To check how many cache invalidations your system is issuing, you can enable debug logging, which will add some `cache invalidate` entries to your `var/log/debug.log` file.

```
php bin/magento setup:config:set --enable-debug-logging=true && php bin/magento cache:flush
```

If you do not want to enabling debug logging in production for some reason, maybe log ingest limitations. You can patch the invalidation logger to change the log level to `info`, so they appear within the `system.log` file.

```
--- vendor/magento/framework/Cache/InvalidateLogger.php
+++ vendor/magento/framework/Cache/InvalidateLogger.php
@@ -43,7 +43,7 @@
      */
     public function execute($invalidateInfo)
     {
-        $this->logger->debug('cache_invalidate: ', $this->makeParams($invalidateInfo));
+        $this->logger->info('cache_invalidate: ', $this->makeParams($invalidateInfo));
     }

     /**
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance57

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.1% 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 ~52 days

Total

3

Last Release

453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ee0b9faa791ec1a3b567e5e3668340aa9954c5f44ed536956d56ea3593584?d=identicon)[SamJUK](/maintainers/SamJUK)

---

Top Contributors

[![SamJUK](https://avatars.githubusercontent.com/u/7872420?v=4)](https://github.com/SamJUK "SamJUK (16 commits)")[![kevinmeijer97](https://avatars.githubusercontent.com/u/9716909?v=4)](https://github.com/kevinmeijer97 "kevinmeijer97 (1 commits)")

---

Tags

cachemagentomagento2magento2-moduleperformance

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/samjuk-m2-module-cache-debounce/health.svg)

```
[![Health](https://phpackages.com/badges/samjuk-m2-module-cache-debounce/health.svg)](https://phpackages.com/packages/samjuk-m2-module-cache-debounce)
```

###  Alternatives

[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)[cheprasov/php-redis-client

Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0

1281.2M21](/packages/cheprasov-php-redis-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

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