Prerequisites:
Namespaces: InRule.Runtime
Classes: FileSystemRuleApplicationReference, CatalogRuleApplicationReference,
InMemoryRuleApplicationReference, RuleSession
See Also: Creating a RuleSession with Cache Retention, Controlling Compilation and Cache Retention, Iterating items in the cache , Working with the Rule Application Cache
References: InRule.Runtime.dll, InRule.Common.dll
In general, items are automatically added to the cache when needed or explicitly using Compile, however
you can manually add rule applications into the cache:
string ruleAppPath = @"c:\temp\Invoice.ruleApp";
// add an item into the cache using a rule application reference
var ruleApp = new FileSystemRuleApplicationReference(ruleAppPath);
RuleSession.RuleApplicationCache.Add(ruleApp);
// add an item into the cache using the path, notice that the same options provided
// by the compile method are also available
RuleSession.RuleApplicationCache.Add(ruleAppPath, true, CacheRetention.FromWeight(3000));
Comments
0 comments
Please sign in to leave a comment.