/** * remove deleted objects from cache */ public function clean() { try { $objectAPI = $this->calendar->getBackend()->getObjectAPI($this->calendar); $list = $objectAPI->listAll(); } catch (BackendUtils\Exception $ex) { return; } $cList = $this->cache->listAll(); $deletedOnRemote = array_diff($cList, $list); $this->cache->deleteList($deletedOnRemote); }
/** * @param string $objectUri */ protected function removeFromCache($objectUri) { $this->cache->deleteList([$objectUri]); }