In order to meet the user's requirement of low energy consumption and low latency in Mobile Edge Computing (MEC), in this paper, a mobility-aware and data caching-based task scheduling strategy in MEC has been proposed, considering the user's mobility behavior and edge caching ability. Task scheduling is performed during the user's movement, and the optimal edge server is selected to provide services for the user, realizing the minimum energy consumption of the MEC system. Since the user accesses the file with repetitiveness, the processed file is cached so that the delay can be reduced when other users access the same file again. The optimization is regarded as a NP hard problem, which is solved by improved differential evolution algorithm in this paper, and the Cache Replacement Algorithm based on File Popularity (CRAFP) is designed. The experimental results show that CRAFP outperforms traditional cache replacement strategies LRU and FIFO in terms of hit rate, energy consumption and delay. Compared with LRU and FIFO, the cache hit rate for CRAFP is increased by 16.32% and 42.09%, respectively, and the energy consumption is decreased by 44.98% and 95.79%, respectively, while the delay is reduced by 33.06% and 83.63%, respectively.