Managing the cache is a more complex task than just managing the layer configuration. Cache is composed of map tiles that you may create at once by seeding the layer or waiting for the users to issue GetMap requests that have gone through the GeoWebCache and are stored as maps tile in the GeoWebCache repository.
The GWC REST interface supports the seeding, truncating, and managing tiles of cached layers.
Create a new XML file, insert the following code, and save it as
seedCoastline.xml
:<seedRequest> <name>NaturalEarth.Coastline</name> <srs> <number>4326</number> </srs> <zoomStart>1</zoomStart> <zoomStop>8</zoomStop> <format>image/png</format> <type>seed</type> <threadCount>4</threadCount> </seedRequest>
Send a cURL request to start seeding for the NaturalEarth:Coastline layer:
$ curl -u admin:geoserver -XPOST...