/** * Delete all of the given keys from the cache. * * @param array $keys The key to delete. * @param bool $recurse When set to true the key will also be deleted from all stacked cache loaders and their stores. * This happens by default and ensure that all the caches are consistent. It is NOT recommended to change this. * @return int The number of items successfully deleted. */ public function delete_many(array $keys, $recurse = true) { $parsedkeys = array_map(array($this, 'parse_key'), $keys); if ($this->is_using_persist_cache()) { foreach ($parsedkeys as $parsedkey) { $this->delete_from_persist_cache($parsedkey); } } if ($recurse && $this->loader !== false) { // Delete from the bottom of the stack first. $this->loader->delete_many($keys, $recurse); } return $this->store->delete_many($parsedkeys); }
/** * Delete all of the given keys from the cache. * * @param array $keys The key to delete. * @param bool $recurse When set to true the key will also be deleted from all stacked cache loaders and their stores. * This happens by default and ensure that all the caches are consistent. It is NOT recommended to change this. * @return int The number of items successfully deleted. */ public function delete_many(array $keys, $recurse = true) { $parsedkeys = array_map(array($this, 'parse_key'), $keys); if ($this->use_static_acceleration()) { foreach ($parsedkeys as $parsedkey) { $this->static_acceleration_delete($parsedkey); } } if ($recurse && $this->loader !== false) { // Delete from the bottom of the stack first. $this->loader->delete_many($keys, $recurse); } return $this->store->delete_many($parsedkeys); }