Hierarchy

  • LRUCache<any>
    • TileCache

Constructors

  • Parameters

    • Optional highWaterMark: number

    Returns TileCache

Properties

highWaterMark: number

Desired max cache size after expireCache(). If set to 0, no cache entries will be pruned at all.

Methods

  • Returns boolean

    Can expire cache.

  • FIXME empty description for jsdoc

    Returns void

  • Parameters

    • key: string

      Key.

    Returns boolean

    Contains key.

  • Parameters

    • usedTiles: {
          [x: string]: boolean;
      }

      Used tiles.

      • [x: string]: boolean

    Returns void

  • Parameters

    • f: ((arg0, arg1, arg2) => unknown)

      The function to call for every entry from the oldest to the newer. This function takes 3 arguments (the entry value, the entry key and the LRUCache object). The return value is ignored.

        • (arg0, arg1, arg2): unknown
        • Parameters

          • arg0: any
          • arg1: string
          • arg2: LRUCache<any>

          Returns unknown

    Returns void

  • Parameters

    • key: string

      Key.

    • Optional options: any

      Options (reserved for subclasses).

    Returns any

    Value.

  • Returns number

    Count.

  • Returns string[]

    Keys.

  • Returns any[]

    Values.

  • Return an entry without updating least recently used time.

    Parameters

    • key: string

      Key.

    Returns any

    Value.

  • Get the key of the newest item in the cache. Throws if the cache is empty.

    Returns string

    The newest key.

  • Returns any

    Last value.

  • Returns string

    Last key.

  • Returns any

    value Value.

  • Prune all tiles from the cache that don't have the same z as the newest tile.

    Returns void

  • Remove an entry from the cache.

    Parameters

    • key: string

      The entry key.

    Returns any

    The removed entry.

  • Parameters

    • key: string

      Key.

    • value: any

      Value.

    Returns void

  • Parameters

    • key: string

      Key.

    • value: any

      Value.

    Returns void

  • Set a maximum number of entries for the cache.

    Parameters

    • size: number

      Cache size.

    Returns void

    Api