Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,18 @@ async function deleteRequest (port = 3001) {
}
}
```

## Cacheable DNS Lookup

### Using CacheableLookup to cache DNS lookups in undici

```js
import { Agent } from 'undici'
import CacheableLookup from 'cacheable-lookup';

const cacheable = new CacheableLookup(opts)

const agent = new Agent({
connect: { lookup: cacheable.lookup }
})
```