@k03mad/request 7.23.3 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/lib/request.js +1 -1
- package/package.json +1 -1
package/app/lib/request.js
CHANGED
|
@@ -106,7 +106,7 @@ export const request = (url, opts = {}, params = {}) => {
|
|
|
106
106
|
* @param {number} [params.rps]
|
|
107
107
|
* @returns {Promise<import('got').Response>}
|
|
108
108
|
*/
|
|
109
|
-
export const requestCache = (url, opts = {}, {cacheBy, expire =
|
|
109
|
+
export const requestCache = (url, opts = {}, {cacheBy, expire = 3600, queueBy, ...params} = {}) => {
|
|
110
110
|
const queue = getQueue(queueBy || new URL(url).host, params);
|
|
111
111
|
|
|
112
112
|
return queue.add(async () => {
|