Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ module.exports = appInfo => {
* @property {Boolean} allowH2 - use urllib@4 HttpClient and enable H2, default is false. Only works on Node.js >= 18
*/
config.httpclient = {
/**
* @deprecated This option is deprecated.
* Use @eggjs/tegg-dns-cache instead.
*/
Comment on lines +310 to +313
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To make the deprecation clearer, it's good practice to explicitly mention that all related options for the built-in DNS cache (enableDNSCache, dnsCacheLookupInterval, and dnsCacheMaxLength) are being deprecated. This will help prevent confusion for developers.

Suggested change
/**
* @deprecated This option is deprecated.
* Use @eggjs/tegg-dns-cache instead.
*/
/**
* @deprecated The built-in DNS cache feature is deprecated. Use `@eggjs/tegg-dns-cache` instead.
* This also deprecates `dnsCacheLookupInterval` and `dnsCacheMaxLength`.
*/

enableDNSCache: false,
dnsCacheLookupInterval: 10000,
dnsCacheMaxLength: 1000,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"egg"
],
"dependencies": {
"@eggjs/tegg-dns-cache": "^3.69.0",
"@types/accepts": "^1.3.5",
"@types/koa": "^2.13.5",
"@types/koa-router": "^7.4.4",
Expand Down Expand Up @@ -61,6 +62,8 @@
"ylru": "^1.3.2"
},
"devDependencies": {
"@eggjs/tegg-config": "^3.69.0",
"@eggjs/tegg-plugin": "^3.69.0",
"@eggjs/tsconfig": "^1.1.0",
"@types/node": "^20.1.2",
"@umijs/preset-react": "^2.1.6",
Expand Down
Loading