Skip to content

Commit c723095

Browse files
committed
Fixed apcu delete when deleting only one item
1 parent c67d103 commit c723095

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

system/cache/apcu.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,10 @@ public function setMulti($namespace, $items, $expire = null, $serverKey = false)
9393
public function delete($namespace, $key = '') {
9494
if ($this->active) {
9595
if ($namespace) {
96-
return apcu_delete(new \APCUIterator('/' . $this->key($namespace, $key) . '.*/'));
97-
9896
if ($key) {
9997
return apcu_delete($this->key($namespace, $key));
10098
} else {
99+
return apcu_delete(new \APCUIterator('/' . $this->key($namespace, $key) . '.*/'));
101100
$cache_info = apcu_cache_info();
102101

103102
$cache_list = $cache_info['cache_list'];

0 commit comments

Comments
 (0)