add inference & try to fix cache problem