protected function saveToCache(/*# string */ $key, $obj)
    {
        // clear stale cache
        if (isset($this->path_cache[$key[0]]) &&
            sizeof($this->path_cache[$key[0]]) > 1
        ) {
            $this->path_cache[$key[0]] = [];
        }

        $this->path_cache[$key[0]][$key] = $obj;
    }