Line 628 in
wms/src/main/java/org/vfny/geoserver/wms/responses/map/kml/CachedHierarchyRegionatingStrategy.java
contains a naive way of figuring it out.
Here's GWC's internal code, but at first glance I think they're
identical for this purpose:
http://geowebcache.org/trac/browser/trunk/geowebca
Hi,
at http://jira.codehaus.org/browse/GEOS-3854
you can see a first cut of the cached superoverlay mode patch.
The patch adds a "cached" superoverlay mode that
delegates directly to GWC for all layers in the request
where this is possible.
The compatibility with GWC is checked by verifying all t