Remove class definition in checkCache function