gwc is a WMS tile cache implemented as a Java servlet. It does automatic matching to the best available tile and supports a wide variety of clients, including WMS-C, Google Earth, Google Maps, and Virtual Earth.