tileCacheBudget property

Future<TileCacheBudget?> get tileCacheBudget

This property defines a source-specific resource budget, either in tile units or in megabytes. Whenever the tile cache goes over the defined limit, the least recently used tile will be evicted from the in-memory cache. Note that the current implementation does not take into account resources allocated by the visible tiles.

Implementation

Future<TileCacheBudget?> get tileCacheBudget async {
  final localStyle = style;
  if (localStyle == null) return null;
  final raw = (await localStyle.getStyleSourceProperty(
    id,
    "tile-cache-budget",
  )).value;
  if (raw == null) return null;
  return TileCacheBudget.decode(raw);
}