/** * Invalidates all cache keys registered to the given list key. * * @param string $key */ public function invalidate($key) { // delete the item $this->getOrmCache()->delete($key); // this is the registration list for this key $list = sprintf('registered:%s', $key); // now delete all queries which results contain this item if (!empty($keys = $this->cache->getList($list))) { foreach ($keys as $key) { $this->getOrmCache()->delete($key); } } // finally remove the list which held the above queries $this->cache->remove($list); }
/** * @inheritdoc */ public function getList($listName) { // no memory cache for lists return $this->cache->getList($listName); }