lilocon / laravel-router-cache
This package is abandoned and no longer maintained.
No replacement package was suggested.
1.0.0
2017-09-13 03:54 UTC
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.1
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2020-01-24 17:10:38 UTC
README
路由缓存 通过apcu缓存特定路由,优化性能
安装
composer require lilocon/laravel-router-cache
配置
注册 ServiceProvider
(5.5+ 版本不需要手动注册):
\Lilocon\RouterCache\RouterCacheServiceProvider::class,
使用
在需要缓存的路由上加一个中间件 router.cache
Route::any('/api', 'ApiController@api')->name('api')->middleware('router.cache');
注意:只有命名的路由才会被缓存
注意:只有关闭debug才会生效
License
MIT