PHP Classes

How to Improve the PHP Opcache Settings to Improve PHP Performance using the Package Yii2 Opcache: Show and update the PHP Opcache settings

Recommend this page to a friend!
  Info   View files Documentation   View files View files (29)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-05-10 (16 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
yii2-opcache 1.0MIT/X Consortium ...7Configuration, Performance and optimi..., P..., A...
Description 

Author

This package can be used to show and update the PHP Opcache settings.

It provides an application that lets users view and change the settings of the PHP Opcache extension.

The application allows the users to access the application from the command line console or via a Web page.

Picture of Insolita
  Performance   Level  
Innovation award
Innovation award
Nominee: 15x

 

Documentation

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

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


  Files folder image Files  
File Role Description
Files folder imagesrc (2 files, 9 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads  
 100%
Total:0
This week:0