{"id":24985883,"url":"https://github.com/samjuk/m2-module-cache-debounce","last_synced_at":"2025-06-25T03:07:16.272Z","repository":{"id":261392799,"uuid":"884175504","full_name":"SamJUK/m2-module-cache-debounce","owner":"SamJUK","description":"Simple Magento 2 extension to debounce FPC flushes to a schedule","archived":false,"fork":false,"pushed_at":"2025-04-26T21:02:01.000Z","size":240,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T01:51:27.060Z","etag":null,"topics":["cache","magento","magento2","magento2-module","performance"],"latest_commit_sha":null,"homepage":"https://www.sdj.pw/posts/magento2-cache-debounce/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamJUK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-06T09:33:34.000Z","updated_at":"2025-05-07T15:43:05.000Z","dependencies_parsed_at":"2025-04-11T22:36:35.453Z","dependency_job_id":"5cb2c995-3aa9-4578-8774-31d9bab40b7e","html_url":"https://github.com/SamJUK/m2-module-cache-debounce","commit_stats":null,"previous_names":["samjuk/m2-module-cache-debounce"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SamJUK/m2-module-cache-debounce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-cache-debounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-cache-debounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-cache-debounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-cache-debounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamJUK","download_url":"https://codeload.github.com/SamJUK/m2-module-cache-debounce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-cache-debounce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261795334,"owners_count":23210620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","magento","magento2","magento2-module","performance"],"created_at":"2025-02-04T10:59:22.815Z","updated_at":"2025-06-25T03:07:16.242Z","avatar_url":"https://github.com/SamJUK.png","language":"PHP","readme":"# SamJUK_CacheDebounce\n\n[![Supported Magento Versions](https://img.shields.io/badge/magento-2.4.3%E2%80%932.4.7-orange.svg?logo=magento)](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://img.shields.io/github/v/release/SamJUK/m2-module-cache-debounce?label=Latest%20Release\u0026logo=github)](https://github.com/SamJUK/m2-module-cache-debounce/releases)\n\nThis 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.\n\nParticularly useful for a ERP solutions that like to issue significant stock updates, in turn flushing cache regularly especially for common parent categories.\n\nIf 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.\n\n\n## Proof Of Concept\n\nThe module was tested on a fresh Luma store with Sample Data, running on CPX31 VPS (4vCPU, 8GB Memory).\n\nTraffic was generated via a golang based sitemap crawler running back to back.\n\nA stock management integration was mocked by, setting a random QTY on a random Sku every 1 second via the PUT StockItems route.\n\n![Before and After Metrics for a POC store](./.github/poc.png)\n\n\n## Installation\n```sh\ncomposer config repositories.samjuk-m2-module-cache-debounce vcs git@github.com:SamJUK/m2-module-cache-debounce.git\ncomposer require samjuk/m2-module-cache-debounce:@dev\nphp bin/magento setup:upgrade \u0026\u0026 php bin/magento cache:flush\n```\n\n## Configuration\nConfiguration can be handled via System configuration, from within the Cache Debounce menu of the SamJUK Tab.\n\nOr can be set via the CLI with the command\n```sh\nphp bin/magento config:set \u003cpath\u003e \u003cvalue\u003e\n```\n\nOption | Config Path | Default | Description\n--- | --- | --- | ---\nEnabled | `samjuk_cache_debounce/general/enabled` | `0` | Feature flag to toggle functionality of the module\nFlush Schedule | `samjuk_cache_debounce/cron/flush_schedule` | `*/5 0 0 0 0` | Cron schedule to run the scheduled flush\n\n## Will this help my store?\n\nThe performance improvement comes from improving cache performance by reducing the amount of cache purge requests in turn reducing system load.\n\nTo 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.\n\n```sh\nphp bin/magento setup:config:set --enable-debug-logging=true \u0026\u0026 php bin/magento cache:flush\n```\n\nIf 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.\n\n```diff\n--- vendor/magento/framework/Cache/InvalidateLogger.php\n+++ vendor/magento/framework/Cache/InvalidateLogger.php\n@@ -43,7 +43,7 @@\n      */\n     public function execute($invalidateInfo)\n     {\n-        $this-\u003elogger-\u003edebug('cache_invalidate: ', $this-\u003emakeParams($invalidateInfo));\n+        $this-\u003elogger-\u003einfo('cache_invalidate: ', $this-\u003emakeParams($invalidateInfo));\n     }\n\n     /**\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjuk%2Fm2-module-cache-debounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamjuk%2Fm2-module-cache-debounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjuk%2Fm2-module-cache-debounce/lists"}