Download the PHP package blackbird/module-cache-warmer without Composer

On this page you can find all versions of the php package blackbird/module-cache-warmer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-cache-warmer

Blackbird Cache Warmer

Latest Stable Version

This module provides functionality to warm up the cache by crawling pages of your Magento store. It helps improve the performance of your store by ensuring that cache is pre-populated, resulting in faster page load times for your customers.

Key functionality includes:

The source code is available at the GitHub repository.


Setup

Get the Package

Zip Package:

Unzip the package into app/code/Blackbird/CacheWarmer, from the root of your Magento instance.

Composer Package:

Install the Module

Go to your Magento root directory, then run the following Magento commands:

If you are in production mode, do not forget to recompile and redeploy the static resources, or to use the --keep-generated option.

Features

Cache Warming

The Cache Warmer module crawls pages of your Magento store to warm up the cache. This helps improve the performance of your store by ensuring that cache is pre-populated, resulting in faster page load times for your customers.

Configurable Crawling

The module provides various configuration options for crawling:

Automatic Async Cache Refresh for Entities

The module includes a feature that automatically triggers an asynchronous cache refresh for entities (products, categories, CMS pages) when their Varnish cache is cleaned. This ensures that entity pages are quickly re-cached after cache invalidation, maintaining optimal performance for your store.

How it works:

  1. When an entity's cache is invalidated in Varnish (through the \Magento\CacheInvalidate\Observer\InvalidateVarnishObserver), the module detects this and adds the entity to a queue.
  2. A cron job runs every minute to process the queue and warm the cache for these entities.
  3. The queue is stored in a dedicated database table (blackbird_cachewarmer_entity_queue), ensuring reliability and persistence.

Supported Entity Types:

Automatic Cache Warming on Full Page Cache Flush

The module includes a feature that automatically triggers cache warming when the full_page cache is flushed from the admin panel. This ensures that your store's pages are quickly re-cached after a cache flush, maintaining optimal performance.

How it works:

  1. When the full_page cache is flushed from the admin panel (either through "Flush Magento Cache" or "Flush Cache Storage"), the module detects this event.
  2. The module sets a flag in the database to indicate that cache warming should be triggered.
  3. A cron job runs every minute to check if cache warming should be triggered.
  4. If cache warming is triggered, the cron job warms the cache for all urls as the command does.
  5. The module uses a timestamp-based flag system to:
    • Ensure that only one cache warming process runs at a time
    • Automatically kill any process that has been running for more than 6 hours

Custom Logging

The module provides custom logging to warmer.log with configurable log levels. You can select the log level for warmer.log (default: error). Messages with this level and higher will be logged to var/log/warmer.log.

Slack Webhook Notifications

The module can send notifications to Slack when cache warming encounters errors. This helps administrators monitor the cache warming process and quickly identify and resolve issues.

How it works:

  1. When cache warming encounters errors, the module sends a notification to the configured Slack webhook URL.
  2. The notification includes a message indicating that errors occurred and advises checking the logs for more details.
  3. This feature can be enabled/disabled in the module configuration.

Usage

Configuration

The module can be configured in the Magento admin panel under Stores > Configuration > Blackbird Extensions > Cache Warmer.

General Configuration

Logging Configuration

Console Commands

The module provides console commands to run the cache warmer:


Extending with Custom Collector Types

The module provides an extensible architecture that allows third-party modules to add their own collector types. To add a custom collector type, follow these steps:

  1. Create a class that implements Blackbird\CacheWarmer\Api\UrlCollectorInterface:

  2. Create a provider class that implements Blackbird\CacheWarmer\Api\CollectorTypeProviderInterface:

  3. Register your provider in your module's di.xml:

Extending with Custom Entity Types

The module provides an extensible architecture that allows third-party modules to add support for additional entity types. To add support for a custom entity type, follow these steps:

  1. Create a class that implements Blackbird\CacheWarmer\Api\EntityUrlProviderInterface:

  2. Register your provider in your module's di.xml:

Requirements


Support


Contact

For further information, contact us:


Authors


License

This project is licensed under the MIT License - see the LICENSE file for details.


That's all folks!


All versions of module-cache-warmer with dependencies

PHP Build Version
Package Version
Requires magento/framework Version *
blackbird/extensions-core Version >=100.0.9
php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blackbird/module-cache-warmer contains the following files

Loading the files please wait ....