The overhead of multi-hop wireless communication reduces the performance of applications that access distributed data in ad hoc networks. We propose neighbor caching strategy to overcome this shortcoming. Neighbor caching make a node possible to expand its caching storage instantaneously by storing its data in the storage of idle neighbors. So if the data source is far away from the node, we reduce the data access overhead by neighbor caching. We also present the ranking based prediction that selects the most appropriate neighbor which data can be stored in. The node that uses the ranking based prediction can select the neighbor that has high possibility to keep data for a long time. Therefore the ranking based prediction improves the throughput of neighbor caching. We compare neighbor caching with self caching that nodes store data in theirs own cache individually. In the results of simulation, neighbor caching make performance better as large as network size, as long as idle time, and as small as cache size. We also show the ranking based prediction is an adaptive algorithm that adjusts frequency of neighbor caching, and it makes neighbor caching flexible according to the idleness of nodes.