How would you implement a caching mechanism to improve application performance in a distributed, high-traffic system?