hoodkit
    Preparing search index...

    Function createHoodCache

    • Create a read-through, request-coalescing cache bound to a hoodchain client.

      Parameters

      Returns HoodCache

      const cache = createHoodCache(hood)
      // 100 concurrent calls → exactly 1 RPC round-trip:
      await Promise.all(Array.from({ length: 100 }, () => cache.getQuote('AAPL')))
      console.log(cache.stats) // { hits: 99, misses: 1, coalesced: 99 } (approx.)