Git Product home page Git Product logo

yii2-opcache's Introduction

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

yii2-opcache's People

Contributors

insolita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yii2-opcache's Issues

PHP 7

Привет.

В коде встречается тайпхинтинг. Либо уберите его, что бы модуль заработал с ПХП 5.6, либо в composer.json укажите правильною зависимость от ПХП 7.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.