Download the PHP package fahlgrendigital/packages-statamic-static-clean without Composer

On this page you can find all versions of the php package fahlgrendigital/packages-statamic-static-clean. 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 packages-statamic-static-clean

🧹 Static Cache Cleaner for Statamic

This command (static-cache:clean) removes orphaned static cache files that remain on disk after Redis has forgotten about them — a common edge case in high-traffic Statamic sites using full static caching.

🧨 Why this is needed

Statamic’s FileCacher stores all cached URLs for a site in a single array, saved to Redis under a single key (statamic:static-cache:urls:<domain>). When multiple requests (e.g. page renders, cache warmers, or invalidations) happen concurrently, they may:

Because this process is not atomic, changes from one process can silently overwrite others. This race condition causes certain pages to disappear from Redis, even though their static .html files remain on disk.

🔒 What about Statamic’s built-in locks?

Statamic’s static cache middleware does apply a per-URL file lock (via Symfony's LockFactory) during a web request. This prevents the same URL from being rendered by multiple requests at the same time.

However, it does not protect the shared Redis key that holds the list of all cached URLs. This Redis write is global and unguarded, which means:

🔁 Statamic has mutex guard rails per page, but not for the global Redis index.

❗ The risk

This issue is most common during:

✅ What this command does

This command:

  1. Uses Statamic’s public APIs (getUrls(), getFilePath(), etc.) to collect all known cache entries from Redis.
  2. Walks the static cache directories to find all existing .html files.
  3. Deletes any file that is no longer referenced in Redis.
  4. Optionally removes empty parent directories — with safeguards to never delete above the static cache root.

💡 Benefits


All versions of packages-statamic-static-clean with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0||^12.0||^13.0
statamic/cms Version ^5.0|^6.0
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 fahlgrendigital/packages-statamic-static-clean contains the following files

Loading the files please wait ...