cloudcommerce/cachewarmer
Composer 安装命令:
composer require cloudcommerce/cachewarmer
包简介
Magento 2 cache warming module that preloads pages to improve performance
README 文档
README
A powerful Magento 2 module that automatically warms page cache by pre-loading URLs to improve site performance, reduce page load times, and enhance user experience. Supports both Magento's built-in Full Page Cache and Varnish cache. Boost your eCommerce store's speed with intelligent cache warming.
Features
- Smart Cache Detection - Checks if pages are already cached before warming
- Varnish Cache Support - Compatible with Varnish cache servers
- Multi-Store Support - Supports multiple store views with separate URL collections
- Flexible Scheduling - Configurable cron times from admin panel
- URL Collection Caching - Caches collected URLs for improved performance
- Comprehensive Logging - Detailed logs for monitoring and debugging
- CLI Commands - Manual cache warming via command line
- Admin Configuration - Easy setup through Magento admin panel
Installation
Via Composer (Recommended)
composer require cloudcommerce/cachewarmer php bin/magento module:enable CloudCommerce_CacheWarmer php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
Manual Installation
- Copy module files to
app/code/CloudCommerce/CacheWarmer/ - Run setup commands:
php bin/magento module:enable CloudCommerce_CacheWarmer php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
Configuration
Navigate to Stores > Configuration > CloudCommerce > Cache Warmer
General Settings
- Enable Cache Warmer - Enable/disable the module
- Cache Warmer Cron Time - Schedule automatic cache warming:
- 12:00 AM - 6:00 AM (hourly options)
- Every Hour
- Every 30 Minutes
- Every 15 Minutes
- Every 5 Minutes
URL Configuration
- Warm Category Pages - Include category URLs
- Warm Product Pages - Include product URLs (limited to 5000 for performance)
- Warm CMS Pages - Include CMS page URLs
- Custom URLs - Add custom URLs (one per line)
CLI Commands
Warm All URLs
php bin/magento cloudcommerce:cache:warm
Warm Specific Store
php bin/magento cloudcommerce:cache:warm --store-id=1
Warm Single URL
php bin/magento cloudcommerce:cache:warm --url="https://example.com/page.html"
Check Cache Status
php bin/magento cloudcommerce:cache:warm --check-cache
php bin/magento cloudcommerce:cache:warm --url="https://example.com/page.html" --check-cache
Cache Management
The module creates a custom cache type "CloudCommerce URL Collection" that appears in: System > Cache Management
This cache stores collected URLs and can be flushed independently from other cache types.
How It Works
- URL Collection - Gathers URLs from categories, products, CMS pages, and custom URLs
- Cache Check - Uses Magento's cache identifier to check if pages are already cached
- Smart Warming - Only makes HTTP requests to uncached pages
- Multi-Store - Processes each store view separately with store-specific URLs
- Cron Automation - Runs automatically based on configured schedule
Performance Features
- Cache-First Approach - Checks cache before making HTTP requests
- URL Collection Caching - Avoids repeated database queries
- Store-Specific Processing - Separate cache keys per store
- Efficient File Checking - Direct cache file existence checks
- Smart Skipping - Skips already cached pages
Logging
Logs are written to var/log/cloudcommerce_cachewarmer.log with detailed information:
- Cache warming results
- Cache status checks
- Error messages
- Performance metrics
Technical Details
- Cache Key Generation - Uses Magento's
IdentifierForSavefor accurate cache keys - File Cache Detection - Checks
var/page_cache/mage--*/mage---{cacheKey}files - Multi-Store Support - Store-specific URL collection and base URLs
- Error Handling - Comprehensive exception handling and logging
Requirements
- Magento 2.4+
- PHP 8.0+
- Full Page Cache or Varnish cache enabled
SEO Keywords
Magento 2 Cache Warmer | Page Cache Warming | Magento Performance Optimization | Full Page Cache | Varnish Cache | Site Speed Optimization | Magento 2 Extension | Cache Management | Performance Module | Page Load Speed | Magento 2 Performance | Cache Preloading | Website Speed Boost | Magento Cache Extension | Performance Enhancement | Fast Loading Pages | Cache Optimization | Magento Speed Module | Page Cache Management | Performance Improvement | Cache Warming Tool
Support
For issues and feature requests, please check the module logs at var/log/cloudcommerce_cachewarmer.log
cloudcommerce/cachewarmer 适用场景与选型建议
cloudcommerce/cachewarmer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 10, 最近一次更新时间为 2025 年 10 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「performance」 「cache」 「optimization」 「magento2」 「warming」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cloudcommerce/cachewarmer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cloudcommerce/cachewarmer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cloudcommerce/cachewarmer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
g4 application profiler package
repository php library
CSS/Javascript Minificator, Compressor and Concatenator for TYPO3 - highly configurable frontend asset optimization for CSS/JS merging, minification and compression with optional body parsing, async/defer loading, inline output, data-ignore exclusions, SRI integrity validation/calculation, external
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.
WordPress mu-plugin to remove jQuery Migrate from the list of jQuery dependencies and to allow jQuery to enqueue before </body> instead of in the <head>.
Create link to static resources with cache-breaking segment based on md5 of the file
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-14