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   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-05-10 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 9 All time: 11,404 This week: 43Up
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.

Innovation Award
PHP Programming Innovation award nominee
May 2024
Number 6
Opcache is an extension built-in PHP that can help PHP scripts that run many times load faster.

This package can be used from the command line console or from a Web page to allow viewing the state of the PHP scripts that are cached by Opcache, as well as let the users adjust settings to improve aspects of the Opcache extension.

Manuel Lemos
Picture of Insolita
  Performance   Level  
Name: Insolita <contact>
Classes: 24 packages by
Country: Russian Federation Russian Federation
Age: 38
All time rank: 330890 in Russian Federation Russian Federation
Week rank: 158 Up6 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 17x

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 (29)  
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

  Files folder image Files (29)  /  src  
File Role Description
Files folder imagecommands (1 file)
Files folder imagecontracts (3 files)
Files folder imagecontrollers (1 file)
Files folder imagemessages (2 directories)
Files folder imagemodels (2 files)
Files folder imageservices (2 files)
Files folder imageutils (3 files)
Files folder imageviews (1 directory)
Files folder imagewidgets (1 file)
  Plain text file Bootstrap.php Class Class source
  Plain text file OpcacheModule.php Class Class source

  Files folder image Files (29)  /  src  /  commands  
File Role Description
  Plain text file OpcacheController.php Class Class source

  Files folder image Files (29)  /  src  /  contracts  
File Role Description
  Plain text file IFileFilterModel.php Class Class source
  Plain text file IOpcacheFinder.php Class Class source
  Plain text file IOpcachePresenter.php Class Class source

  Files folder image Files (29)  /  src  /  controllers  
File Role Description
  Plain text file DefaultController.php Class Class source

  Files folder image Files (29)  /  src  /  messages  
File Role Description
Files folder imageen (3 files)
Files folder imageru (3 files)

  Files folder image Files (29)  /  src  /  messages  /  en  
File Role Description
  Accessible without login Plain text file hint.php Aux. Auxiliary script
  Accessible without login Plain text file interface.php Aux. Auxiliary script
  Accessible without login Plain text file status.php Aux. Auxiliary script

  Files folder image Files (29)  /  src  /  messages  /  ru  
File Role Description
  Accessible without login Plain text file hint.php Aux. Auxiliary script
  Accessible without login Plain text file interface.php Aux. Auxiliary script
  Accessible without login Plain text file status.php Aux. Auxiliary script

  Files folder image Files (29)  /  src  /  models  
File Role Description
  Plain text file FileFilterModel.php Class Class source
  Plain text file OpcacheStatus.php Class Class source

  Files folder image Files (29)  /  src  /  services  
File Role Description
  Plain text file OpcacheFinder.php Class Class source
  Plain text file OpcachePresenter.php Class Class source

  Files folder image Files (29)  /  src  /  utils  
File Role Description
  Plain text file Helper.php Class Class source
  Plain text file OpcacheException.php Class Class source
  Plain text file Translator.php Class Class source

  Files folder image Files (29)  /  src  /  views  
File Role Description
Files folder imagedefault (6 files)

  Files folder image Files (29)  /  src  /  views  /  default  
File Role Description
  Accessible without login Plain text file blacklist.php Aux. View script
  Accessible without login Plain text file config.php Aux. View script
  Accessible without login Plain text file files.php Aux. View script
  Accessible without login Plain text file index.php Aux. View script
  Accessible without login Plain text file _charts.php Aux. View script
  Accessible without login Plain text file _menu.php Aux. View script

  Files folder image Files (29)  /  src  /  widgets  
File Role Description
  Plain text file PieWidget.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:9
This week:0
All time:11,404
This week:43Up