fixing cache engine prefix

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6365 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-01-11 18:35:45 +00:00
parent 7b2627caa2
commit 34bbeb0d39
4 changed files with 7 additions and 4 deletions

View file

@ -379,7 +379,7 @@ class CacheEngine extends Object {
* @access public
*/
function init($settings = array()) {
$this->settings = array_merge(array('duration'=> 3600, 'probability'=> 100), $settings);
$this->settings = array_merge(array('prefix' => 'cake_', 'duration'=> 3600, 'probability'=> 100), $settings);
return true;
}
/**

View file

@ -49,7 +49,8 @@ class MemcacheEngineTest extends UnitTestCase {
function testSettings() {
$settings = Cache::settings();
$expecting = array('duration'=> 3600,
$expecting = array('prefix' => 'cake_',
'duration'=> 3600,
'probability' => 100,
'servers' => array('127.0.0.1'),
'compress' => false,

View file

@ -63,7 +63,8 @@ class ModelEngineTest extends CakeTestCase {
function testSettings() {
$settings = Cache::settings();
$expecting = array('duration'=> 3600, //[optional]
$expecting = array('prefix' => 'cake_',
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'className' => 'CacheTestModel', //[optional]
'fields' => array('data', 'expires'), //[optional]

View file

@ -49,7 +49,8 @@ class XcacheEngineTest extends UnitTestCase {
function testSettings() {
$settings = Cache::settings();
$expecting = array('duration'=> 3600,
$expecting = array('prefix' => 'cake_',
'duration'=> 3600,
'probability' => 100,
'engine' => 'Xcache',
'PHP_AUTH_USER' => 'cake',