Ticket #4476: cache.php.diff
File cache.php.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/cache.php
92 92 function delete($id, $group = 'default', $force = false) { 93 93 if (empty ($group)) 94 94 $group = 'default'; 95 96 if (!$force && false === $this->get($id, $group, false)) 95 if ( empty($id) && isset($this->cache[$group])) { 96 foreach( (array) $this->cache[$group] as $key => $value) { 97 $id = ( is_string($value) && $this->get( $value, $group, false) ) ? (string) $value : (string) $key; 98 $this->non_existant_objects[$group][$id] = true; 99 $this->dirty_objects[$group][] = $id; 100 } 101 unset($this->cache[$group]); 102 } elseif (!$force && false === $this->get($id, $group, false)) { 97 103 return false; 98 99 unset ($this->cache[$group][$id]); 100 $this->non_existant_objects[$group][$id] = true; 101 $this->dirty_objects[$group][] = $id; 104 } else { 105 unset ($this->cache[$group][$id]); 106 $this->non_existant_objects[$group][$id] = true; 107 $this->dirty_objects[$group][] = $id; 108 } 102 109 return true; 103 110 } 104 111