/** * {@inheritdoc} */ public function deleteMulti(array $keys) { // check the current values to see if they currently exists, so we can // properly return true/false as would be expected from KeyValueStore $items = $this->getMulti($keys); $success = array(); foreach ($keys as $key) { $success[$key] = array_key_exists($key, $items); } // only attempt to store those that we've deleted successfully to local $values = array_intersect_key($success, array_flip($keys)); if (empty($values)) { return array(); } // mark all as expired in local cache (see comment in delete()) $this->local->setMulti($values, -1); $this->defer->deleteMulti(array_keys($values)); return $success; }