项目作者: Insolita

项目描述 :
Opcache management for yii2 from console or adminlte-based gui module
高级语言: PHP
项目地址: git://github.com/Insolita/yii2-opcache.git
创建时间: 2017-04-05T21:12:47Z
项目社区:https://github.com/Insolita/yii2-opcache

开源协议:

下载


Yii2 OpCache module

Show statistic, config, reset all, invalidate files, search in cached files

Installation

The preferred way to install this extension is through composer.

Either run

  1. php composer.phar require --prefer-dist insolita/yii2-opcache "~1.0"

or add

  1. "insolita/yii2-opcache": "~1.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

  1. 'bootstrap'=>[
  2. ...
  3. \insolita\opcache\Bootstrap::class
  4. ...
  5. ],
  6. ...
  7. 'modules'=>[
  8. ...
  9. 'opcache'=>[
  10. 'class'=>'insolita\opcache\OpcacheModule',
  11. 'as access'=>[
  12. 'class' => \yii\filters\AccessControl::class,
  13. 'rules' => [
  14. [
  15. 'allow' => true,
  16. //Protect access
  17. 'roles' => ['developer'],
  18. ],
  19. ],
  20. ]
  21. ],
  22. ...
  23. ]

Go to route ['/opcache/default/index']

Also for console command usage - add in console configuration

  1. 'bootstrap'=>[
  2. ...
  3. \insolita\opcache\Bootstrap::class
  4. ...
  5. ],
  6. ...
  7. 'controllerMap'=>[
  8. 'opcache'=>[
  9. 'class'=>\insolita\opcache\commands\OpcacheController::class
  10. ]
  11. ]

commands opcache/status opcache/config opcache/files opcache/reset opcache/invalidate will be available

Screens

Status
Files
Config

Understanding OpCache

@see https://habrahabr.ru/company/mailru/blog/310054/ (Ru)

@see http://jpauli.github.io/2015/03/05/opcache.html (En)

P.S.

Russian settings translation based on
https://sabini.ch/cms/perevod-nastroek-zend-opcache.html