{"action":"closed","issue":{"url":"https://api.github.com/repos/qiujiayu/AutoLoadCache/issues/19","repository_url":"https://api.github.com/repos/qiujiayu/AutoLoadCache","labels_url":"https://api.github.com/repos/qiujiayu/AutoLoadCache/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/qiujiayu/AutoLoadCache/issues/19/comments","events_url":"https://api.github.com/repos/qiujiayu/AutoLoadCache/issues/19/events","html_url":"https://github.com/qiujiayu/AutoLoadCache/issues/19","id":171848684,"number":19,"title":"ReferenceError: \"retVal\" is not defined","user":{"login":"kyle1970","id":2378042,"avatar_url":"https://avatars.githubusercontent.com/u/2378042?v=3","gravatar_id":"","url":"https://api.github.com/users/kyle1970","html_url":"https://github.com/kyle1970","followers_url":"https://api.github.com/users/kyle1970/followers","following_url":"https://api.github.com/users/kyle1970/following{/other_user}","gists_url":"https://api.github.com/users/kyle1970/gists{/gist_id}","starred_url":"https://api.github.com/users/kyle1970/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyle1970/subscriptions","organizations_url":"https://api.github.com/users/kyle1970/orgs","repos_url":"https://api.github.com/users/kyle1970/repos","events_url":"https://api.github.com/users/kyle1970/events{/privacy}","received_events_url":"https://api.github.com/users/kyle1970/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-18T08:45:24Z","updated_at":"2016-08-19T01:25:26Z","closed_at":"2016-08-19T01:25:26Z","body":"我使用jdk8,autoload-cache:4.16,JavaScriptParser，jsel表达式时候出现一个问题\r\n1、在使用@Cache(expire=300, key=\"retVal.userName\", condition=\"args[0]>0\")时候报错：\r\njavax.script.ScriptException: ReferenceError: \"retVal\" is not defined in <eval> at line number 1\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:455) ~[nashorn.jar:na]\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:416) ~[nashorn.jar:na]\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:70) ~[nashorn.jar:na]\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:499) ~[nashorn.jar:na]\r\n\tat javax.script.CompiledScript.eval(CompiledScript.java:92) ~[na:1.8.0_51]\r\n\tat com.jarvis.cache.script.JavaScriptParser.getElValue(JavaScriptParser.java:87) ~[autoload-cache-4.16.jar:na]\r\n\tat com.jarvis.cache.script.AbstractScriptParser.getDefinedCacheKey(AbstractScriptParser.java:67) ~[autoload-cache-4.16.jar:na]\r\n\tat com.jarvis.cache.AbstractCacheManager.getCacheKey(AbstractCacheManager.java:254) [autoload-cache-4.16.jar:na]\r\n\tat com.jarvis.cache.AbstractCacheManager.getCacheKey(AbstractCacheManager.java:283) [autoload-cache-4.16.jar:na]\r\n\tat com.jarvis.cache.AbstractCacheManager.proceed(AbstractCacheManager.java:95) [autoload-cache-4.16.jar:na]\r\n\tat com.jarvis.cache.aop.nutz.AutoLoadCacheAopInterceptor.filter(AutoLoadCacheAopInterceptor.java:42) [autoload-cache-nutz-4.11.jar:na]\r\n\tat org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60) [nutz-1.r.57.jar:na]\r\n\tat flow.core.dao.UserDao$$NUTZAOP.getById(UserDao.java:1) [nutz-1.r.57.jar:na]\r\n\r\n2、但是我改成写模式就能正确返回retVal\r\n@Cache(expire=300, key=\"retVal.userName\",opType=CacheOpType.WRITE, condition=\"args[0]>0\")\r\n这种写模式不会报错，但是在读写模式情况下会抛错"}}
{"actor":{"display_login":"qiujiayu"}}