src/Comodojo/Cache/Drivers/Memcached.php 1 location
|
@@ 134-146 (lines=13) @@
|
| 131 |
|
*/ |
| 132 |
|
public function clear($namespace = null) { |
| 133 |
|
|
| 134 |
|
if ( $namespace == null ) { |
| 135 |
|
|
| 136 |
|
return $this->getInstance()->flush(); |
| 137 |
|
|
| 138 |
|
} else { |
| 139 |
|
|
| 140 |
|
$scope = $this->getNamespaceKey($namespace); |
| 141 |
|
|
| 142 |
|
if ( $scope === false ) return false; |
| 143 |
|
|
| 144 |
|
return $this->getInstance()->delete($namespace); |
| 145 |
|
|
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
} |
| 149 |
|
|
src/Comodojo/Cache/Drivers/PhpRedis.php 1 location
|
@@ 176-188 (lines=13) @@
|
| 173 |
|
|
| 174 |
|
try { |
| 175 |
|
|
| 176 |
|
if ( $namespace == null ) { |
| 177 |
|
|
| 178 |
|
return (bool) $this->getInstance()->flushDB(); |
| 179 |
|
|
| 180 |
|
} else { |
| 181 |
|
|
| 182 |
|
$scope = $this->getNamespaceKey($namespace); |
| 183 |
|
|
| 184 |
|
if ( $scope === false ) return false; |
| 185 |
|
|
| 186 |
|
return (bool) $this->getInstance()->delete($namespace); |
| 187 |
|
|
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
} catch (RedisException $re) { |
| 191 |
|
|