3

I have activated the "Enable direct WMS Integration" switch in Geoserver 2.5. As far as I can understand, this enables caching of layers without having to use the "gwc/service/wms" endpoint in the WMS URL.

I assume that this enables geowebcache tilecaching dynamically when the tiles are requested. However, I am not seeing the correponding cache being created in the gwc directory in geoserver_data_dir.

Is it working? How can I tell?

2

2 Answers 2

3

If you look on this page you will see there are a number of conditions that must all be met before caching will occur. So you will need to be certain that all of these are met, which in general operation is unlikely.

When this feature is enabled, GeoServer WMS will cache and retrieve tiles from GeoWebCache (via a GetMap request) only if all of the following criteria are followed:

  • WMS Direct integration is enabled (you can set this on the Caching defaults page)
  • tiled=true is included in the request
  • The request only references a single layer
  • Caching is enabled for that layer
  • The image requested is of the same height and width as the size saved in the layer configuration
  • The requested CRS matches one of the available tile layer gridsets
  • The image requested lines up with the existing grid bounds
  • A parameter is included for which there is a corresponding Parameter Filter
1
  • Thanks....after I added simply the tiled:true parameter to the Openlayers config everything worked fine. Commented May 22, 2014 at 17:21
3

Adding to iant, this is how I check if the integration is workin or not.

If you check the HTTP Response Headers on a successful request you would see something like:

Cache-Control:max-age=7776000
Connection:Keep-Alive
Content-Disposition:inline; filename=Cartografia-autostrada.png8
Content-Type:image/png
Date:Thu, 22 May 2014 14:15:34 GMT
ETag:a803579b8cdf87b21bb5481baaf69f40
geowebcache-cache-result:HIT
geowebcache-crs:EPSG:900913
geowebcache-gridset:900913_custom
geowebcache-layer:Cartografia:autostrada
geowebcache-tile-bounds:1281696.0901071709,5841011.9526272025,1286588.059916866,5845903.922436898
geowebcache-tile-index:[6, 2, 3]
Keep-Alive:timeout=15, max=76
Last-Modified:Wed, 07 Aug 2013 11:25:01 GMT
Set-Cookie:GS_FLOW_CONTROL="GS_CFLOW_-2399fb09:1462436e382:-5184"; Version=1
Transfer-Encoding:chunked
ConsoleSearchEmulationRendering

while on an unsuccessful one:

Cache-Control:max-age=7776000, must-revalidate
Connection:Keep-Alive
Content-Disposition:inline; filename=Cartografia-autostrada.png
Content-Type:image/png; mode=8bit
Date:Thu, 22 May 2014 14:15:32 GMT
Expires:Wed, 20 Aug 2014 14:15:32 GMT
geowebcache-cache-result:MISS
geowebcache-miss-reason:
Keep-Alive:timeout=15, max=81
Set-Cookie:GS_FLOW_CONTROL="GS_CFLOW_-2399fb09:1462436e382:-5184"; Version=1
Transfer-Encoding:chunked

which in "some" cases gives also an explanation for the MISS.

Simone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.