steve-moretz/laravel-opcache
Composer 安装命令:
composer require steve-moretz/laravel-opcache
包简介
This package allows you to clear OPcache from CLI.
README 文档
README
This Laravel package allows you to clear OPcache, solving a common problem related to cache invalidation during atomic deployments (also called "zero downtime deploy").
Getting Started
These instructions allow you to install the package into an existing Laravel app.
Installation
You can install this package via Composer using:
composer require steve-moretz/laravel-opcache
Config Website Url
php artisan vendor:publish --provider="SteveMoretz\LaravelOpcacheClear\OpcacheClearServiceProvider"
Now you can go ahead and change the website url if necessary.
Usage
Clear
php artisan opcache:clear
Watch Invalidate Cache
- First you need to install
yarn add chokidar
- Now can goto
config/opcache.phpand set watch_globs to list of directories and files you want to watch.
eg :
"watch_globs" => [__DIR__ . "/../../**/*.php"]
- Now you can run
php artisan opcache:watch
Suggestion
Run this command during deployment process in order to automate the cleaning process before you app became active!
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-16