Class DefaultCommerceRuleEngineCache

java.lang.Object
de.hybris.platform.ruleengine.cache.impl.DefaultRuleEngineCache
de.hybris.platform.ruleengineservices.cache.impl.DefaultCommerceRuleEngineCache
All Implemented Interfaces:
RuleEngineCache, CommerceRuleEngineCache

public class DefaultCommerceRuleEngineCache extends DefaultRuleEngineCache implements CommerceRuleEngineCache
DefaultCommerceRuleEngineCache is the default implementation for caching fact templates. The getRaoCacheCreators() are used by this cache's cache builders (createKIEModuleCacheBuilder(DroolsKIEModuleModel)) to create "facts templates" during the initialization of a module. The getRaoProviders() are used to generate copies of the cached "fact templates" (see getCachedFacts(DroolsKIEBaseModel)). Note: During the addKIEModuleCache(KIEModuleCacheBuilder) a check (see checkFactTemplates(Map)) is done to ensure that for each created fact template there is a registered RAOProvider (matched by its class) that can create a copy of the fact template. This check can be disabled (via setting the defaultCommerceRuleEngineCache.checkRAOProvidersForCache property to false). If the check is disabled and a fact template has no corresponding RAOProvider to create a copy, it will simply be inserted directly as a fact into the rule evaluation context. This can be useful if a fact template doesn't require to have a copy created for each rule evaluation (e.g. if the fact template is not modified by any rules during rule evaluation).