https://github.com/insolita/yii2-opcache
Opcache management for yii2 from console or adminlte-based gui module
https://github.com/insolita/yii2-opcache
console-tool hacktoberfest module opcache yii2
Last synced: over 1 year ago
JSON representation
Opcache management for yii2 from console or adminlte-based gui module
- Host: GitHub
- URL: https://github.com/insolita/yii2-opcache
- Owner: Insolita
- Created: 2017-04-05T21:12:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-20T15:17:07.000Z (over 8 years ago)
- Last Synced: 2025-02-28T01:18:37.952Z (over 1 year ago)
- Topics: console-tool, hacktoberfest, module, opcache, yii2
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist insolita/yii2-opcache "~1.0"
```
or add
```
"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 :
```php
'bootstrap'=>[
...
\insolita\opcache\Bootstrap::class
...
],
...
'modules'=>[
...
'opcache'=>[
'class'=>'insolita\opcache\OpcacheModule',
'as access'=>[
'class' => \yii\filters\AccessControl::class,
'rules' => [
[
'allow' => true,
//Protect access
'roles' => ['developer'],
],
],
]
],
...
]
```
Go to route ```['/opcache/default/index']```
Also for console command usage - add in console configuration
```php
'bootstrap'=>[
...
\insolita\opcache\Bootstrap::class
...
],
...
'controllerMap'=>[
'opcache'=>[
'class'=>\insolita\opcache\commands\OpcacheController::class
]
]
```
commands opcache/status opcache/config opcache/files opcache/reset opcache/invalidate will be available
Screens
-------



#### 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