MCPcopy Create free account
hub / github.com/protomaps/PMTiles / constructor

Method constructor

js/src/index.ts:752–762  ·  view source on GitHub ↗
(
    maxCacheEntries = 100,
    prefetch = true, // deprecated
    decompress: DecompressFunc = defaultDecompress
  )

Source from the content-addressed store, hash-verified

750 decompress: DecompressFunc;
751
752 constructor(
753 maxCacheEntries = 100,
754 prefetch = true, // deprecated
755 decompress: DecompressFunc = defaultDecompress
756 ) {
757 this.cache = new Map<string, SharedPromiseCacheValue>();
758 this.invalidations = new Map<string, Promise<void>>();
759 this.maxCacheEntries = maxCacheEntries;
760 this.counter = 1;
761 this.decompress = decompress;
762 }
763
764 async getHeader(source: Source): Promise<Header> {
765 const cacheKey = source.getKey();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected