@tikoci/centrs
    Preparing search index...

    Class MndpCache

    A neighbor cache that expires entries TTL ms after they were last seen.

    Index
    • get timeToLiveMs(): number

      TTL this cache applies to neighbors that advertise none, in milliseconds.

      Returns number

    • Record a freshly decoded neighbor. Upserts by mndpNeighborKey, refreshing lastSeenAt and replacing the stored announcement, and returns the resulting entry. A dying gasp (ttlSeconds === 0) instead removes the key and returns undefined: its packet carries only MAC and addresses, so it must not replace the full announcement.

      Parameters

      Returns MndpCacheEntry | undefined

    • Drop expired entries; returns the number removed.

      Parameters

      • at: number = ...

      Returns number

    • Number of non-expired entries currently held.

      Parameters

      • at: number = ...

      Returns number