There are some components available on the net but you should always be very much careful about what you are doing. Because caching mechanism has some disadvangates like lack of supporting transactions. In addition, if you have several way of updates on your database, you cannot use caching at all.
For example assume that you have an application which is using a caching system. While it's doing some statements with the database from a single point (i.e. your JDBC driver) it can manage the cache. lets say you have an INSERT statement. you can simply insert your record as well as insert the record in your cache. but if you have another external system (i.e. a cluster of several servers or a legacy system) your caching mechanism cannot be aware of what the other systems are doing with the database. so, for example you may show a record of data which is coming from cache while it's removed from the database by another application !