screeps-cartographer
    Preparing search index...

    Function cachePath

    • Generate a path from origin to destination, based on the passed opts. Caches the path in the configured cache (or MemoryCache by default) with the provided key. Returns the generated path (or the cached version, if it exists).

      Parameters

      • key: string
      • origin: RoomPosition
      • targets: RoomPosition | RoomPosition[] | _HasRoomPosition | MoveTarget | MoveTarget[]
      • Optionalopts: MoveOpts

      Returns RoomPosition[] | undefined