toboto / cakephp-ocscache
阿里云OCS插件,用于CakePHP 2.x框架
1.0
2019-12-24 09:35 UTC
Requires
- php: >=5.3.0
- cakephp/cakephp: >=2.4
Requires (Dev)
- phpunit/phpunit: 3.7.*
Suggests
- cakephp/cakephp-codesniffer: Easily check code formatting against the CakePHP coding standards.
This package is auto-updated.
Last update: 2024-09-24 21:13:54 UTC
README
要求
- PHP5(带有Memcached模块和SASL支持)
- CakePHP = 2.4
安装
cd your_cake_app/app/Plugin
git clone git://github.com/toboto/cakephp-ocscache.git Ocs
在Config/bootstrap.php中的配置示例
<?php
CakePlugin::load('Ocs');
Cache::config('default', array(
'engine' => 'Ocs.Ocs',
'duration' => 3600,
'probability' => 0, // [deprecated] The cache will not flush in this engine.
'prefix' => 'myapp_ocscache_'
'servers' => array(
array('your_instance.m.cnqdalicm9pub001.ocs.aliyuncs.com', 11211)
// The engine supports only one OCS instance because of the limit in OCS authentication.
),
'username' => 'your_instance',
'password' => 'password'
));
参考
PHP5和带有SASL支持的Memcached模块:https://drupal.org/node/2063811
对于中国开发者,带有SASL的Memcached参考如下:
- CentOS:http://help.aliyun.com/view/11108324_13444498.html?spm=5176.7225337.1997284509.3.335dUr
- Ubuntu:http://bbs.aliyun.com/read/150127.html?spm=5176.7114037.1996646101.13.hLUJwA
作者
Murray Wang (toboto) http://weibo.com/tobotorui