protected function loadCache(string $name)
    {
        $path = $this->cache_path;
        $cache_file = $path . '/' . $name  . '.cache';

        if (file_exists($cache_file))
        {
            if (!is_readable($cache_file))
            {
                self::getLogger()->error("Cannot read cache from {0}", [$cache_file]);
            }
            else
            {
                try
                {
                    $contents = file_get_contents($cache_file);
                    $data = unserialize($contents);
                    if (!is_array($data))
                        $data = [];
                    $this->repository[$name] = $data;
                    $this->repository[$name]['_changed'] = false;
                    $this->checkExpiry($name);
                    return;
                }
                catch (\Throwable $t)
                {
                    self::getLogger()->error("Failure loading cache {0} - removing", [$name]);
                    self::getLogger()->error("Error: {0}", [$t]);
                    if (is_writable($cache_file))
                        unlink($cache_file);
                }
            }
        }
        self::getLogger()->debug("Cache {0} does not exist - creating", [$cache_file]);
        $this->repository[$name] = [];
    }