Environment: GeoServer 3.0.1
I have an IaC workflow where edits are made to GeoServer settings via REST API, this works fine for most settings. However, part of these edits include gwc-gs.xml and it is not possible to get these edits to apply without a container restart - the GWC reload endpoint does not reload these settings, so viewing in the web UI or subsequent layer publishing does not work.
Steps to Reproduce:
-
Modify a global GWC caching setting in
gwc-gs.xmldirectly on disk, or via resource API. -
POSTrequest to/geoserver/gwc/rest/reloadand/or/geoserver/rest/reload. -
Check the GWC defaults in the GeoServer Web UI.
-
Publish a brand-new layer via the GeoServer REST API or Web UI.
Expected Behavior: The Web UI should reflect the updated gwc-gs.xml settings. When the new layer is published, GeoServer should query the updated configuration and apply the new global GWC rules to the layer’s caching profile.
Actual Behavior: GeoServer continues to use the stale, in-memory GWCConfig loaded during the initial JVM startup. The Web UI shows the old settings, and the newly published layer applies the outdated caching rules. The disk state and memory state remain out of sync until a full servlet restart.
Impact: This severely limits automated provisioning and infrastructure-as-code (IaC) workflows. Configurations modified via CI/CD pipelines or configuration management tools (Ansible, Terraform) cannot be fully applied to the GWC subsystem without incurring downtime via a hard restart.