Cache: a part of a computer’s memory where information is kept so that the computer can find it very quickly
Nearest Place to CPU to find Objects are Primary Memory, File System, Database and Network.
We have software which supports cache. No need to implement from scratch. But we need to know concepts and fundamentals behind this. There are different Cache Algorithms to use.
Cache Algorithms: http://en.wikipedia.org/wiki/Cache_algorithms
Open Source Cache Software List: http://java-source.net/open-source/cache-solutions
HTTP Connection Pool: http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html
FTP Connection Pool
Image / JS / HTML Cache in transit, Network Route Optimization : http://www.akamai.com/