Caching the most popular contents at the wireless network edge such as small-cell base stations (SBSs) is a smart way of reducing duplicated content transmissions and offloading the mobile data traffic in the network backhaul. Currently, most small-cell caching strategies are conceived, designed, and optimized based on the global content request probability (GCRP), with very limited consideration of the individual content request probability (ICRP) reflecting personal preferences. To enable more efficient wireless caching, in this paper, we propose a novel localized deterministic caching framework, drawing upon the recent advances in recommendation systems based on machine learning techniques. By introducing the concept of the rating matrix, we first propose a new Bayesian learning method to predict personal preferences and estimate the ICRP. This crucial information is then incorporated into our caching strategy for maximizing the system throughput, or equivalently, minimizing the download latency, where a deterministic caching algorithm based on reinforcement learning is proposed to optimize the content placement. To this end, we extend the framework to enable device-to-device (D2D) connections to further reduce the download delay, and also design a feedback mechanism to improve the accuracy in the ICRP estimation. Our simulation results verified that with the estimated ICRP and the proposed caching strategy, the proposed framework can significantly outperform the existing methods in terms of hit rate and system throughput.