Implement cache size limit for script caching

This commit is contained in:
kwaroran
2024-11-04 18:55:50 +09:00
parent df614954b8
commit b714e01aba

View File

@@ -75,6 +75,10 @@ function cacheScript(scripts:customscript[], data:string, result:string){
processScriptCache.set(hash, result)
if(processScriptCache.size > 500){
processScriptCache.delete(processScriptCache.keys().next().value)
}
}
function getScriptCache(scripts:customscript[], data:string){