mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Add default prefix to RedisEngine
This makes redis work like the other cache engines. Also by having a default prefix the clear() method will not wipe all the data in the current redis database. Refs #4876
This commit is contained in:
parent
1c440e2cb2
commit
b86aae4d8b
2 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,7 @@ class RedisEngine extends CacheEngine {
|
||||||
}
|
}
|
||||||
parent::init(array_merge(array(
|
parent::init(array_merge(array(
|
||||||
'engine' => 'Redis',
|
'engine' => 'Redis',
|
||||||
'prefix' => null,
|
'prefix' => Inflector::slug(APP_DIR) . '_',
|
||||||
'server' => '127.0.0.1',
|
'server' => '127.0.0.1',
|
||||||
'database' => 0,
|
'database' => 0,
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
|
|
|
@ -77,6 +77,7 @@ class RedisEngineTest extends CakeTestCase {
|
||||||
'persistent' => true,
|
'persistent' => true,
|
||||||
'password' => false,
|
'password' => false,
|
||||||
'database' => 0,
|
'database' => 0,
|
||||||
|
'unix_socket' => false,
|
||||||
);
|
);
|
||||||
$this->assertEquals($expecting, $settings);
|
$this->assertEquals($expecting, $settings);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue