Does anyone know if it's possible to truncate a GeoServer/GeoWebCache layer by viewparameter
but ignore any env
parameters?
We want to be able to truncate all tiles generated with viewparam=WhateverParamer:1
regardless of the env
parameters supplied when the tile was requested/generated.
For example; We may have a layer that has a single viewparam
but 2 env
parameters. When we go to truncate, we don't want to remove all the layer tiles (e.g. can't be done with /masstruncate
) but only the tiles generated with viewparam=WhateverParamer:1
. This means we have to send a truncate request for every possible combination of those 2 env
parameters * the available values for those env
parameters. If the env
parameter can have a large number of possible values, this can lead to having to send a huge number of requests to truncate the layer.
We've tried a few different things to get this to work:
- Send the truncate request supplying the
viewparam
but without theenv
param - This truncates nothing because all tiles were generated with at least oneenv
param
<?xml version="1.0" encoding="UTF-8"?>
<seedRequest>
<name>layer_name</name>
<type>truncate</type>
<gridSetId>EPSG:900913</gridSetId>
<zoomStart>0</zoomStart>
<zoomStop>30</zoomStop>
<format>image/png</format>
<threadCount>16</threadCount>
<parameters>
<entry>
<string>viewparams</string>
<string>WhateverParamer:1</string>
</entry>
</parameters>
</seedRequest>
- Use the
masstruncate
endpoint and attempt to supply theviewparams
- This truncates nothing because I don't believe this is what this was intended for (I think this has to do with orphaned parameter filter tiles)
<truncateParameters>
<layerName>layer_name</layerName>
<parameters>
<entry>
<string>viewparams</string>
<string>WhateverParamer:1</string>
</entry>
</parameters>
</truncateParameters>
- Even supplying the
env
entry but leaving it blank, using a wildcard, regex...just about everything we could think of. - Still truncates nothing without explicitly supplying theenv
param the tile was generated with. - Each of these combinations using both XML and form-encoded request.
Does anyone have any suggestions on how we can accomplish this without sending a huge number of requests?
UPDATE
It looks like this has come up before on the Geoserver User Mailing List and looking through the Github issues/PRs it appears that there have been merged PRs dealing with this #360 & #359...however I haven't been able to glean if or how this helps solve this issue...nor how I might modify the truncate request to take advantage of these changes.