Skip to content

Crawler 0.1.0+ ​

📝 Name: crawler · 🖥️ Option: -c, --crawler

FQCN of the crawler to use for cache warmup.

INFO

The default crawler depends on whether the configuration option progress is set. In this case the OutputtingCrawler is used, otherwise the ConcurrentCrawler.

TIP

You can also implement a custom crawler that fits your needs.

Example ​

Make sure the crawler can be autoloaded by PHP and provide the FQCN.

bash
./cache-warmup.phar -c "Vendor\\Crawler\\MyCustomCrawler"
./cache-warmup.phar --crawler "Vendor\\Crawler\\MyCustomCrawler"
json
{
    "crawler": "Vendor\\Crawler\\MyCustomCrawler"
}
php
use EliasHaeussler\CacheWarmup;

return static function (CacheWarmup\Config\CacheWarmupConfig $config) {
    $config->setCrawler(\Vendor\Crawler\MyCustomCrawler::class);

    return $config;
};
yaml
crawler: 'Vendor\\Crawler\\MyCustomCrawler'
bash
CACHE_WARMUP_LIMIT="Vendor\\Crawler\\MyCustomCrawler"

Released under the GNU General Public License 3.0 (or later)