Generates cache if not found, fixed Python3 issues