Given the problems with a centralized cloud and the emergence of ultra-low latency applications and the needs of the Internet of Things (IoT), it has been found that novel methods are needed to support the centralized cloud technology. Mobile edge computing is one of the solutions to mitigate these challenges. In this paper, we study task caching at the network edge to improve network efficiency. In the proposed scheme, we get a general prediction of the possibility of re-requesting tasks in the future using convolutional neural networks (CNN). Using this possibility and the characteristics of a task itself, including the required cache space and the required amount of processing, we rank the number of this type of task in the neighbors and the number of last requests for this task using the fuzzy Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) and select the best replacement option available in the cache. The proposed scheme has proved to be of considerable benefit in terms of reducing the delay and energy usage, as well as improving overall network efficiency.