Abstract In the wake of the development of mobile devices, how to provide low-latency mobile services with the limited battery power is attracting more and more attention. A novel paradigm, edge computing, can make services closer to users, which can dramatically reduce the latency and improve battery life of UEs. However, inappropriate placement and utilization of caching can degrade the system performance. In this paper, a cache-aware task scheduling method in edge computing is proposed. First, an integrated utility function is derived with respect to the data chunk transmission cost, caching value and cache replacement penalty. Data chunks are cached at optimal edge servers to maximize the integrated utility value. After placing the caches, a cache locality-based task scheduling method is presented. We model the task scheduling problem as a weighted bipartite graph. Weights of edges of the graph are mainly influenced by the locations of the required data. During each heartbeat, maximal weighted matching between tasks and resources are obtained. All the proposed algorithms have polynomial time complexities which are acceptable in edge computing. Furthermore, extensive experiments show that the cache-aware task scheduling algorithm outperforms other baseline algorithms in terms of the cache hit ratio, data locality, data transmission time, task response time and energy consumption costs.