diff --git a/cmd/tegola/cmd/cache/cache.go b/cmd/tegola/cmd/cache/cache.go index 687e30794..8c2d998c9 100644 --- a/cmd/tegola/cmd/cache/cache.go +++ b/cmd/tegola/cmd/cache/cache.go @@ -159,16 +159,20 @@ func doWork(ctx context.Context, tileChannel *TileChannel, maps []atlas.Map, con }(i) } + nonParamMaps := make([]atlas.Map, 0) + + for _, m := range maps { + // we don't support caching for maps with custom parameters + if m.Params != nil || len(m.Params) > 0 { + log.Warnf("caching is disabled for map %s as it has custom parameters configures", m.Name) + } + nonParamMaps = append(nonParamMaps, m) + } + // run through the incoming tiles, and generate the mapTiles as needed. TileChannelLoop: for tile := range tileChannel.Channel() { - for _, m := range maps { - - // we don't support caching for maps with custom parameters - if m.Params != nil || len(m.Params) > 0 { - continue - } - + for _, m := range nonParamMaps { if ctx.Err() != nil { cleanup = true break