Skip to content

Commit

Permalink
Debug logging for cache hits and misses
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbrethorst committed Oct 19, 2024
1 parent 36376b9 commit 31bcb04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/map/MapView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@
const key = cacheKey(zoomLevel, boundingBox);
if (stopsCache.has(key)) {
console.debug("Stop cache hit: ", key);
return stopsCache.get(key);
}
else {
console.debug("Stop cache miss: ", key);
}
const response = await fetch(
`/api/oba/stops-for-location?lat=${lat}&lng=${lng}&latSpan=${boundingBox.north - boundingBox.south}&lngSpan=${boundingBox.east - boundingBox.west}&radius=1000`
Expand Down

0 comments on commit 31bcb04

Please sign in to comment.