eliashaeussler/cache-warmup

Composer package to warm up website caches, based on a given XML sitemap

3.0.1 2024-03-31 08:28 UTC

README

Screenshot

Cache Warmup

Coverage Maintainability CGL Tests Supported PHP Versions

A library to warm up website caches of URLs located in XML sitemaps. It is written in PHP and was first released back in 2020.

Cache warmup is performed by concurrently sending simple HEAD requests to those URLs, either from the command line or by using the provided PHP API. The whole warmup process is highly customizable, e.g. by defining a crawling limit, excluding sitemaps and URLs by exclusion patterns or by using a specific crawling strategy. It is even possible to write custom crawlers that take care of cache warmup.

🚀 Features

  • Warm up caches of URLs located in XML sitemaps
  • Console command and PHP API for cache warmup
  • Out-of-the-box support for sitemap indexes
  • Exclusion patterns for sitemaps and URLs
  • Various crawling strategies to modify crawling behavior
  • Support for gzipped XML sitemaps
  • Interface for custom crawler implementations

🔥 Quickstart

# Download latest release
curl -sSLO https://github.com/eliashaeussler/cache-warmup/releases/latest/download/cache-warmup.phar
chmod +x cache-warmup.phar

# Run cache warmup
./cache-warmup.phar "https://www.example.com/sitemap.xml"

Find more installation methods in the official documentation.

📕 Documentation

Find all available installation methods, configuration options and customization opportunities in the official documentation.

🧑‍💻 Contributing

Please have a look at CONTRIBUTING.md.

⭐ License

This project is licensed under GNU General Public License 3.0 (or later).