新增缓存值函数

This commit is contained in:
谷成伟 2024-11-28 16:11:21 +08:00
parent 5d14ef2655
commit 14d49d08bf

View File

@ -62,7 +62,7 @@ public class FunctionCacheValue extends AbstractFunction {
String key = (String)keyData.getValue(env); String key = (String)keyData.getValue(env);
String scriptName = (String)env.get("G_SCRIPTNAME"); String scriptName = (String)env.get("G_SCRIPTNAME");
String cacheKey = String.format("%s_%s", scriptName, key); String cacheKey = String.format("%s%s_%s", CACHE_PREFIX, scriptName, key);
Double value = redis.get(cacheKey); Double value = redis.get(cacheKey);
if (value == null) { if (value == null) {
return AviatorNil.NIL; return AviatorNil.NIL;