I have a GeoServer running with a layer that I can load in leaflet using WMS. Currently "caching on demand" seems to work: If I load the map for the second time it loads much faster than loading it for the first time. However I would like to pre seed the map. But it doesn't seem to work: once the map is seeded, it still loads as slow the first time. Then, the second time, as "caching on demand" seems to kick in, it loads faster again. When I inspect the GeoServer data folder, files and folders are created after seeding, so at least tiles are being generated. But after the first request, additional files are created. So to me it looks like preseeding is working, but it does not create all the tiles necessary and so it still needs to create new tiles when I request tiles. Here is a screenshot of the settings that I use in GWC to generate the tiles:
The layer is originally defined in SRS EPSG:28992, but it is reprojected to EPSG:900913 as defined in the settings:
I am using the following code using Leaflet to load the map:
var mymap = L.map('mapid').setView([52.296904, 4.852940], 15);
var wmsLayer = L.tileLayer.wms('http://localhost:8080/geoserver/wms?',
{
layers: 'acme:pand',
tiled: true
}).addTo(mymap);