With rapid development of Internet of Vehicles (IoVs), various computation-intensive vehicular applications impose great challenges on the limited computing resources of vehicles. To improve the user experience of vehicular applications, the emerging vehicular edge computing (VEC) offloads tasks to roadside edge servers. However, competition over communication and computing resources is inevitable among vehicles. How to make optimal task offloading decisions for vehicles, so as to reduce delay, balance server load and save energy, is worth researching in-depth. In this paper, first, a vehicle-to-vehicle (V2V) communication path acquisition algorithm is designed, and a task caching mechanism introduced which cache some completed applications and related codes on the edge server. Then, a vehicular networking model with joint task caching mechanism for edge-cloud collaboration is proposed. To obtain the near-optimal solutions to this problem, we design a multi-objective evolutionary algorithm based joint task caching and edge-cloud computing decision algorithm (JTCEC-MOEA/D) to maximize the utilities of vehicles. Finally, the proposed algorithm is evaluated by the Technique for Order Preference by Similarity to an Ideal Solution (TOPSIS) method. The simulation results show that the proposed algorithm can make optimal task offloading-making for vehicles.