studio24/http-cache-clear
最新稳定版本:v0.2.1
Composer 安装命令:
composer require studio24/http-cache-clear
包简介
Clear old cache data from the Symfony HTTP Cache (filesystem) based on an expiry time
关键字:
README 文档
README
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:
composer require studio24/http-cache-clear
Usage
The default command clears the HTTP Cache of cache files that are 4 hours or older.
./bin/http-cache-clear
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:
./bin/http-cache-clear -h
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.
./bin/http-cache-clear --path=cache
The default is to clear all files older than 4 hours. You can change this by passing the expiry argument.
./bin/http-cache-clear var/cache --expiry=24
Tests
Run phpunit:
./vendor/bin/phpunit
Run codesniffer:
./vendor/bin/phpcs
License
The MIT License (MIT). Please see License File for more information.
Credits
统计信息
- 总下载量: 15.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-18