toboto/cakephp-ocscache

阿里云OCS插件,用于CakePHP 2.x框架

1.0 2019-12-24 09:35 UTC

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参考如下:

作者

Murray Wang (toboto) http://weibo.com/tobotorui

邮箱:wangrui@teeker.com