mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
parent
e0d2c45d9a
commit
e8a0726737
1 changed files with 5 additions and 1 deletions
|
@ -273,7 +273,8 @@ class MemcachedEngine extends CacheEngine {
|
|||
*
|
||||
* @param bool $check If true no deletes will occur and instead CakePHP will rely
|
||||
* on key TTL values.
|
||||
* @return bool True if the cache was successfully cleared, false otherwise
|
||||
* @return bool True if the cache was successfully cleared, false otherwise. Will
|
||||
* also return false if you are using a binary protocol.
|
||||
*/
|
||||
public function clear($check) {
|
||||
if ($check) {
|
||||
|
@ -281,6 +282,9 @@ class MemcachedEngine extends CacheEngine {
|
|||
}
|
||||
|
||||
$keys = $this->_Memcached->getAllKeys();
|
||||
if ($keys === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($keys as $key) {
|
||||
if (strpos($key, $this->settings['prefix']) === 0) {
|
||||
|
|
Loading…
Reference in a new issue