src/Comodojo/Cache/Drivers/Memcached.php 1 location
|
@@ 94-106 (lines=13) @@
|
| 91 |
|
|
| 92 |
|
public function clear($namespace = null) { |
| 93 |
|
|
| 94 |
|
if ( $namespace == null ) { |
| 95 |
|
|
| 96 |
|
return $this->getInstance()->flush(); |
| 97 |
|
|
| 98 |
|
} else { |
| 99 |
|
|
| 100 |
|
$scope = $this->getNamespaceKey($namespace); |
| 101 |
|
|
| 102 |
|
if ( $scope === false ) return false; |
| 103 |
|
|
| 104 |
|
return $this->getInstance()->delete($namespace); |
| 105 |
|
|
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
} |
| 109 |
|
|
src/Comodojo/Cache/Drivers/PhpRedis.php 1 location
|
@@ 151-163 (lines=13) @@
|
| 148 |
|
|
| 149 |
|
try { |
| 150 |
|
|
| 151 |
|
if ( $namespace == null ) { |
| 152 |
|
|
| 153 |
|
return (bool) $this->getInstance()->flushDB(); |
| 154 |
|
|
| 155 |
|
} else { |
| 156 |
|
|
| 157 |
|
$scope = $this->getNamespaceKey($namespace); |
| 158 |
|
|
| 159 |
|
if ( $scope === false ) return false; |
| 160 |
|
|
| 161 |
|
return (bool) $this->getInstance()->delete($namespace); |
| 162 |
|
|
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
} catch (RedisException $re) { |
| 166 |
|
|