protected function loadCache()
    {

        if (empty($this->cacheListing)) return false;

        foreach ($this->cacheListing as $key => $entry) {
            if (!$entry) {
                continue;
            }


            if (!($entry instanceof Entry)) {
                /** @var $entry Entry */
                unset($entry);
                continue;
            }

            /** @var $entry Entry */
            if (!$entry->getId()) {
                unset($this->cacheListing [$key]);
                continue;
            }

            // if there is no value or the time to live is exceeded
            // unset the index and if necessary allocated the memoryblock
            if (!$entry->getData() || ($entry->getTtl() !== self::TTL_UNLIMITED && $entry->getTtl() < time())) {
                if ($entry instanceof Entry) {
                    $entry->delete();
                }

                unset($this->cacheListing [$key]);
                continue;
            }

            $this->list [$key] = $entry->getData();
        }

        return true;
    }