properly set the prefixes len for cachedb