Namespace: Cache

Cache

Singleton cache instance for managing tile loading and caching across layers. Provides efficient tile retrieval and memory management with configurable capacity and request rate limiting.

Properties:
Name Type Description
capacity number

Total cache capacity in bytes (default: 512MB)

size number

Current amount of GPU RAM used

maxRequest number

Maximum concurrent HTTP requests (default: 6)

requested number

Current number of active requests

maxRequestsRate number

Maximum requests per second (0 for unlimited)

maxPrefetch number

Maximum size of prefetched tiles in bytes

prefetched number

Current amount of prefetched GPU RAM

layers Array.<Layer>

Array of layers being managed by the cache

Source: