salopot / yii2-debug-memcached

Yii2调试模块的memcached面板

dev-master 2016-05-23 09:49 UTC

This package is not auto-updated.

Last update: 2024-09-22 06:42:21 UTC


README

Yii2调试模块的memcached面板

功能

  • 按服务器显示memcached统计信息
  • 自动从缓存组件获取配置
  • 可配置警告的缓存使用级别
  • 使用格式化程序或内部转换器显示统计信息

安装

安装此扩展的首选方式是通过 composer

运行以下命令:

php composer.phar require --prefer-dist salopot/yii2-debug-memcached "dev-master"

或者

"salopot/yii2-debug-memcached": "dev-master"

将以下内容添加到您的 composer.json 文件的require部分。

更新配置:将面板添加到您的调试模块配置中

'components'=>[
    ...
    'cache' => [
        'class' => 'yii\caching\MemCache',
         'servers' => [
            [
                'host' => 'server1',
                'port' => 11211,
                'weight' => 100,
            ],
            [
                'host' => 'server2',
                'port' => 11211,
                'weight' => 50,
            ],
            ***
         ],

    ],
    ...

],
...
'modules'=>[
    ...
    'debug'=>[
        ...
        'panels'=>[
            ...
            'memcached'=>[
                'class' => '\salopot\debug\memcached\panels\MemcachedPanel',
                //'useFormatter' => false,
            ]
        ]
    ]
    ...
]

使用方法

您将在应用程序每个页面的底部看到调试工具栏。您可以通过点击“Memcached”工具栏面板来查看更详细的调试信息。