Large Peer-to-Peer (P2P) systems for file transfer exhibit the presence of communities based on semantic, geographic, or organizational interests of users. Generally, resources commonly shared within individual communities are relatively unpopular and inconspicuous in the system-wide behavior. These communities are unable to benefit significantly from performance enhancement schemes such as caching that focus only on the most dominant queries. We propose a generic caching framework that enhances lookup performance of individual communities while providing even better performance to the dominant communities. The caching framework can be used with any structured P2P system that provides alternative paths to a given destination. Furthermore, the solution is adaptive to changing popularity and user interests, works with any skewed distribution of queries, needs small caches, utilizes local statistics, and introduces minimal modifications and overhead to the overlay network. Simulations based on Chord overlay show 40% reduction in average path length with individual communities indicating three times improvement in performance over system-wide caching.