LRU Cache
功能:最近最少使用策略。
数据库查询缓存应用配置:
1 | ); |
12 | } |
13 | return bean; |
14 | } |
15 | } |
文件名:orderMainTest
1 | // 添加配置(包所在路劲),方面后面的引用自动添加包名前缀 |
2 | Configuration config = new Configuration(); |
3 | config.addEventTypeAutoName("cn.chenx.esper.method"); |
4 | |
5 | // |
6 | EPServiceProvider epServiceProvider = EPServiceProviderManager |
7 | .getDefaultProvider(config); |
8 | EPAdministrator epAdmin = epServiceProvider.getEPAdministrator(); |
9 | |
10 | ConfigurationOperations configOper = epAdmin.getConfiguration(); |
11 | configOper.addImport(MyEvent.class); |
12 | |
13 | String epsql = "select me.key as result from orderEvent as oe,method:MyEvent.getEvent(oe.salary) as me "; |