insolita/yii2-opcache

Yii2 OpCache module - Show statistic, config, reset all, invalidate files, search in cached files

Maintainers

👁 Insolita

Package info

github.com/Insolita/yii2-opcache

Type:yii2-extension

pkg:composer/insolita/yii2-opcache

Statistics

Installs: 68 505

Dependents: 0

Suggesters: 0

Stars: 15

Open Issues: 0

1.04 2017-05-19 11:19 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT c929db99b7b0c3064f37c4f3959c24f798a5d1a7

  • insolita <webmaster100500.woop@ya.ru>

extensionOpcacheyii2

This package is auto-updated.

Last update: 2026-06-11 20:36:03 UTC


README

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

Installation

The preferred way to install this extension is through composer.

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 :

'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

'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

👁 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