So far the GWC integration story is that a "WMSLayer" is created by the GeoServer with a custom backing "WMSSourceHelper" subclass that instead of issuing a WMS request forwards to the dispatcher, and that's it.
This poses a number of limitations, forced or not by the approach:
- it is not possible to configure anything for the integrated layers, with cached formats and CRS hardcoded. If anything else is needed the only way out is to hand write the configuration for a new layer in geowebcache.xml and it can't be named the same than the geoserver layer.
- The biggest bottleneck in seeding is the encoding and decoding of the WMS generated images to further cropping by re-encoding before storing the tiles. It would be better if the RenderedImage generated by GeoServer is taken directly avoiding the encoding/decoding step.
These improvements will allow to:
- Have a custom TileLayer implementation that defers to the GeoServer Dispatcher to generate the images, but takes the resulting image directly instead of encoding/decoding before seeding the tiles
- This custom TileLayer will be configurable
- The configuration options will be stored as part of its corresponding GeoServer Catalog's LayerInfo or LayerGroupInfo. Which properties to make configurable are to be defined, but at a minimum it'll include: meta tiling factors, image formats, gutter, gridset ids, whether to cache the non default styles
- Some global config options will be added in order to set the default values for the integrated TileLayers properties, instead of having them hardcoded
- It should be possible to seed/truncate non default styles upon style changes, or when a style is added or removed from a layer
- The "Direct WMS Integration" should work for TileLayer parameter filters, allowing the regular WMS to defer to the cached version also if there are parameter filters (like extra styles) set on a TileLayer
- It should be possible to turn off automatically caching any new layer
- Make layer caching an opt-in option on a per layer basis
- The global defaults should match the historical hardcoded values though
- It should be possible to turn on/off specific GWC services (WMS-C, TMS, WMTS)
- A new "Cached Layers" page holding a list of cached layers similar to the GeoServer's regular "Layers" page that lists the cached layers, the used disk quota, and allows to enable/disable cached layers, as well as to add new ones or remove them.