Caching popular contents at a large number of access points and edge-clouds is a promising solution to alleviate the increasing backhaul congestion in beyond fifth-generation (B5G) networks. By integrating with cell-free massive multiple-input multiple-output (CF mMIMO), wireless caching can harness their combined virtues, i.e., almost uniform service quality, strong macro-diversity, and reduction of the data traffic from the core network. In this paper, we consider an offline cache-aided scenario with two caching strategies to minimize the total energy consumption (TEC), which are evaluated from the cache hit probability (CHP). The TEC minimization is showed to be NP-complete and, hence, dealt with a proposed greedy algorithm. An adaptive power control policy is proposed to reduce the TEC. We compare CF mMIMO with small cells in terms of the successful content delivery probability (SCDP) and TEC, respectively. The numerical results show that CF mMIMO can offer a much more uniform service, significantly higher SCDP, and lower average TEC when compared to than SC.