mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-02 03:51:53 +08:00
Perf: reduce infra runtime costs
This commit is contained in:
@@ -13,11 +13,12 @@ module.exports.parse = (domain) => {
|
||||
return cache.sync(domain, () => tldts.parse(domain, sharedConfig));
|
||||
};
|
||||
|
||||
const gothillGetDomainCache = createCache('cached-gorhill-get-domain', true);
|
||||
let gothillGetDomainCache = null;
|
||||
/**
|
||||
* @param {import('gorhill-publicsuffixlist').default | null} gorhill
|
||||
*/
|
||||
module.exports.createCachedGorhillGetDomain = (gorhill) => {
|
||||
gothillGetDomainCache ||= createCache('cached-gorhill-get-domain', true);
|
||||
/**
|
||||
* @param {string} domain
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user