Is there any REST API for remove wms cache of a layer in GeoServer?

I use gwc/rest/masstruncate but it returns status 500. I can clear cache of a layer manually in TileCashign in GeoServer but I need API for this.

my request is: curl -v -u user:pass -POST -H "Content-type: text/xml" -d "<truncateLayer><layerName>workspace:layer</layerName></truncateLayer>" "http://localhost:8080/geoserver/gwc/rest/masstruncate/"

and my response is: Truncation failed

  • What does the log file show? – Ian Turton Aug 11 '19 at 18:23
  • @lan I edit my question – Ali-T Aug 13 '19 at 4:20
  • turn logging up and look again – Ian Turton Aug 13 '19 at 16:06
  • The same error occurred again – Ali-T Aug 14 '19 at 4:53
  • but there was a stacktrace? – Ian Turton Aug 14 '19 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.