private function getIndex($key, $tags)
    {
        // tags folder
        $tagFolder = $this->createFolderNameFromTags($tags);

        if (!is_dir($tagFolder)) {
            mkdir($tagFolder, 0755, true);
        }

        // key folder
        $folder = $tagFolder . substr($key, 0, 2) . DIRECTORY_SEPARATOR . substr($key, 2,
                2) . DIRECTORY_SEPARATOR . substr($key, 4, 2) . DIRECTORY_SEPARATOR;
        if (!is_dir($folder)) {
            mkdir($folder, 0755, true);
        }

        // check if index exists
        return $folder . 'index.db';
    }