/** * Get all module settings for a module * * @param string $module The module wherefore a setting has to be retrieved. * * @return array */ public function getForModule($module) { $settings = $this->getSettings(); if (isset($settings[$module])) { return $settings[$module]; } // try again after clearing the cache $this->cache->deleteItem('settings'); $settings = $this->getSettings(); if (isset($settings[$module])) { return $settings[$module]; } return array(); }
/** * Removes the item from the pool. * * @param string $key * The key for which to delete * * @throws InvalidArgumentException * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return bool * True if the item was successfully removed. False if there was an error. */ public function deleteItem($key) { return $this->local->deleteItem($key) && $this->remote->deleteItem($key); }
public function remove($key) { $this->pool->deleteItem($key); }
/** * @param CacheItemPoolInterface $pool * @param $key */ private function evictKey(CacheItemPoolInterface $pool, $key) { if (!$key || !$pool->hasItem($key)) { return; } $pool->deleteItem($key); }
/** * Delete the value associated to the specified key * * @param string $value Value name * @param AbstractModule $mod Calling module * @return bool Deletion successful? */ public function deleteI($value, AbstractModule $mod = null) { $this->checkInit(); return $this->cache->deleteItem($this->getKeyName($value, $mod)); }
/** * {@inheritdoc} */ public function deleteItem($key) { return $this->pool->deleteItem($key); }
/** * {@inheritdoc} */ public function deleteItem($key, array $tags = []) { return $this->cache->deleteItem($key, $tags); }
public function deleteItem($key) { return $this->decorated->deleteItem($key); }
/** * @param SettingsOwnerInterface $owner * @param string $name * * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. */ protected function invalidateCache($name, SettingsOwnerInterface $owner = null) { return $this->storage->deleteItem($this->getCacheKey($name, $owner)); }
/** * {@inheritdoc} */ public function deleteItem($key, array $tags = []) { $taggedKey = $this->generateCacheKey($key, $tags); return $this->pool->deleteItem($taggedKey); }
/** * @inheritDoc */ public function delete(string $key) : bool { return $this->pool->deleteItem($key); }