aviatorscript
aviatorscript copied to clipboard
编译后的expression 外部缓存支持
编译后的expression缓存在外部环境中,比如说redis(尝试过,但是无法序列化为Expression)。如果服务多实例部署,缓存在本地是否存在一致性问题
自己做数据一致性保证吧
我同样有此问题,能详细说下吗 @hillfly
有空我测试下 redis,按理说应该可以
@killme2008 看上去expression没有实现java的序列化接口,不能缓存到外部环境中。
5.4.0 released, ship serialization feature for compiled expression.
See the test case for usage:
https://github.com/killme2008/aviatorscript/blob/master/src/test/java/com/googlecode/aviator/ExpressionSerializeTest.java
The Option.SERIALIZABLE
must be enabled.
The example
https://github.com/killme2008/aviatorscript/blob/master/src/test/java/com/googlecode/aviator/example/SerializeExample.java