Skip to content

Commit

Permalink
Warn about disabled caching
Browse files Browse the repository at this point in the history
  • Loading branch information
bemyak committed Oct 17, 2022
1 parent 35e3024 commit cb3e35e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions cmd/tegola/cmd/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb3e35e

Please sign in to comment.