Download the PHP package studio24/http-cache-clear without Composer
On this page you can find all versions of the php package studio24/http-cache-clear. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download studio24/http-cache-clear
More information about studio24/http-cache-clear
Files in studio24/http-cache-clear
Package http-cache-clear
Short Description Clear old cache data from the Symfony HTTP Cache (filesystem) based on an expiry time
License MIT
Homepage https://github.com/studio24/http-cache-clear
Informations about the package http-cache-clear
Clear the expired items from HTTP Cache on the command line
Symfony's HTTP Cache is a powerful way to cache entire HTTP responses and provide fast, full-page caching for your website or web application.
However, due to a known flaw if you use the default filesystem method to store HTTP Cache files this does not clean up expired cache files, which can fill up a disk drive.
We created this small tool to help delete the expired cache files from Symfony's HTTP Cache.
Installation
Install via Composer:
Usage
The default command clears the HTTP Cache of cache files that are 4 hours or older.
By default the command clears the cache in var/cache
for the prod
environment and for all files older than 4
hours.
You can change these options on the command line. View help to see how:
One note on the --path
option. The command appends the environment and http_cache
folder, so the following command
actually clears the HTTP cache in cache/prod/http_cache
.
The default is to clear all files older than 4 hours. You can change this by passing the expiry
argument.
Tests
Run phpunit:
Run codesniffer:
License
The MIT License (MIT). Please see License File for more information.