It would be great to get an advice on this topic as its something it troubles me regularly in different projects.
I always find it hard to work efficiently with geoserver and geowebcache when it comes to cached layers etc.
I use a stack of technologies, which are difficult to change (in the current project). I know that my geoserver is quite old (2.5).
I also use geoserver api and gsconfig to create new layers, update the bounding box of a layer etc. I also use a set of POST requests (with python) to add new features on my point/polygon and line layers.
It works but not always. Although I send a seed request to make sure that I update my layer based on the new data:
<seedRequest> <name>workspace:layer_name.xml</name> <srs> <number>4326</number> </srs> <zoomStart>1</zoomStart> <zoomStop>20</zoomStop> <format>image/png</format> <type>truncate</type> <threadCount>2</threadCount> </seedRequest>
I don't always get to see what it actually exists on the layer and is visible through the layer preview functionality of geoserver. Most of the time if I zoom in/out the features appear (in some random zoom level).
I understand that something goes wrong with the seeding process. Tiles are not seeded correctly/ Old features, which were moved or don't exist keep popping up in different zoom levels.
I also suspect that this might be the browser's cache. Of course I cannot ask from the users to hard reset their browser.
Are there specific strategies to follow here? To bypass the cached file etc?
Settings in geoserver
Checking the HTTP headers in developers tool I see that my geowebcache-cache-result equals to MISS. There must be something wrong with the WMS request.
This is my RequestURL:
The above image displays the Response Headers for the request of a specific layer. I see now that in other layers there is no issue the geowebcache-cache-result parameter (it equals to HIT).
But if I understand correctly the issue is that while geowebcache in this case works, sometimes it returns outdated tiles. Does someone can understand something more from the above screenshot?