It is a bit convoluted, indeed, but AFAIK, it is using the cache and working fine. The cache is populated here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java#L301 It is set here: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java#L180 And we have some tests here: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/KieCompilationCacheTest.java Edson On Mon, Jul 7, 2014 at 7:01 PM, Federico Bertola <federico.bertol...@gmail.com> wrote: > Hi Edson, > yes I saw that the JavaDialect class retrieve the compilation cache from > the conf, but after a quick search it seems no one use the > setCompilationCache method of KnowledgeBuilderConfigurationImpl, not > even in the tests. So I was wondering what was the best way to use it... > > Maybe I get something wrong, in that case, I apologize :) > > Federico. > > On 07/07/2014 21:04, Edson Tirelli wrote: >> Federico, >> >> Not sure why you say it is not used? >> >> Drools tries to use any pre-compiled resource bytecode if it is >> available in the cache. If it is not available, it falls back to JIT >> compilation: >> >> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialect.java#L627 >> >> Edson >> >> On Sat, Jul 5, 2014 at 11:34 AM, Federico Bertola >> <federico.bertol...@gmail.com> wrote: >>> Hi, >>> from what I see, the protobuf cache that the KnowledgeBuilder produce >>> and saves as *.cache, is not currently used anywhere, right? If so, what >>> would it be required to reload the compilation data inside the >>> KnowledgeBuilder? There's something I'm missing or there is some piece >>> of code demonstrating this capability? >>> >>> Best regards, >>> Federico. >>> _______________________________________________ >>> rules-users mailing list >>> rules-users@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >> > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users