Implemented short circuiting to bypass codegen if cache exists and use cached code instead