Optimize Cache Size

vendic/module-optimize-cache-size

Reduces cache keys by removing product/category specific layout handles. Improves performance by decreasing cache size and average Redis TTL.

No errors foundPHPStan level 5Build passingsilver partnerSemVer violations (83% compliant)

Supported Magento versions: 2.4.9

88,673 installs★ 36 starsLatest: v2.1.0Released 2026-07-30License: MIT

composer require vendic/module-optimize-cache-size

README

Reproduced from the package’s own README, under its own license, as of 2026-09-13. Links and images point back at the source repository.

Vendic_OptimizeCacheSize

Magento 2 extension that reduces the number of cache keys by removing catalog_product_view_id_, catalog_product_view_sku_, catalog_product_view_attribute_set_, catalog_category_view_id_ layout handles by default,

This means that you lose the option to have product/category specific layout handles (both through the use of XML files in your installation and through the use of Design > Layout and Design > Custom Layout Update on the category and product edit pages in the admin), unless you re-enable them via the configuration.

Configuration: Stores -> Configuration -> Vendic -> Optimize Cache Size

Installation

composer require vendic/module-optimize-cache-size

Related discussions

Results

Here's a some real life results from a Magento 2.4 instance with 7k products and 1.5k categories:

number cache keys

cache ttl

The arrow marks the release of this extension. You can clearly see the results. Cache keys were reduced 50% (or more). Average Redis TTL also dropped significantly.

← All packages from vendic