Skip to content

Commit 12cea13

Browse files
committed
Empty tiles are now cached
1 parent cd9ad33 commit 12cea13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/tiles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ async fn get_tile(
181181
CACHE_HITS.inc();
182182
return Ok((tile, Via::Cache));
183183
}
184+
CACHE_MISSES.inc();
184185

185186
if !query.is_empty() {
186187
if validate_filter(&query).is_err() {
@@ -203,12 +204,11 @@ async fn get_tile(
203204
)
204205
.await?;
205206

206-
if original_local_where_clause_is_empty && !tile.is_empty() {
207+
if original_local_where_clause_is_empty {
207208
cache_wrapper
208209
.write_tile_to_cache(name, x, y, z, &tile, max_cache_age)
209210
.await?;
210211
}
211-
CACHE_MISSES.inc();
212212

213213
Ok((tile, Via::Database))
214214
}

0 commit comments

Comments
 (0)