[GIS] Openlayers requests to geoserver don’t produce cached tiles

geoservergeowebcacheopenlayers-2

I've created a grouped layer made from 4 MrSID rasters.
I have a Openlayers map with basic Google layer.
When I preview the grouped layer in geoserver , I see that tiles are being created in the GWC folder (tried both EPSG:4326 and EPSG:900919).

When I view the layer in my openlayers application (on same localhost machine) , no cached tiles are being created (I've cleared the browser cache to make sure the tiles are being generated from geoserver).

In my Openlayers I'm using GeoExt2 … but still its regular WMS call.

Any idea why no tiles are being generated ?!

Best Answer

The Geoserver Documentation mentions:

GeoWebCache is a tiling server. It runs as a proxy between a map client and map server, caching (storing) tiles as they are requested, eliminating redundant request processing and thus saving large amounts of processing time. GeoWebCache is integrated with GeoServer, though it is also available as a standalone product for use with other map servers.

GWC can act as a Wrapper to the WMS and you can use it in your app by using an url like: http://example.com/geoserver/gwc/service/wms instead of http://example.com/geoserver/wms

If you want to use GWC tiles directly from the WMS URL, you need to provide a tiled=true parameter in the request.

The Tiles will be gnerated in two cases:

  • Either you hit the GWC URL (directly or via the tiled=true parameter in the WMS request)

  • or You seed the tile sets

To consume the tiles, you have to use GWC, via the URL or via the parameter in the WMS service

Related Question