protected function getPath(/*# string */ $key)/*# : string */
    {
        // get directory first
        if (($pos = strrpos($key, '/')) !== false) {
            $dir  = $this->dir_root . DIRECTORY_SEPARATOR .
                    substr($key, 0, $pos) . DIRECTORY_SEPARATOR;
            $key  = substr($key, $pos + 1);
        } else {
            $dir  = $this->dir_root . DIRECTORY_SEPARATOR;
        }

        // get file path
        if (is_callable($this->path_func)) {
            $func = $this->path_func;
            $file = $func($key);

        // hashed version
        } else {
            $file = $key ? $this->hashIt($key) : '';
        }

        return $dir . $file;
    }