class Geoserver::Publish::Geowebcache
Attributes
connection[R]
Public Class Methods
new(conn = nil)
click to toggle source
# File lib/geoserver/publish/geowebcache.rb, line 8 def initialize(conn = nil) @connection = conn || Geoserver::Publish::Connection.new end
Public Instance Methods
masstruncate(layer_name:, request_type: "truncateLayer")
click to toggle source
This will masstruncate all caches for a given layer. Note: that this implementation differs from the GWC Rest documentation which seems to be wrong. See: github.com/GeoWebCache/geowebcache/issues/785
# File lib/geoserver/publish/geowebcache.rb, line 16 def masstruncate(layer_name:, request_type: "truncateLayer") payload = "<#{request_type}><layerName>#{layer_name}</layerName></#{request_type}>" connection.post( path: "masstruncate", payload: payload, content_type: "text/xml" ) end