You are here: Core engine > Caching > Rule cache

rule cache

The PRPC engine maintains an in-memory cache of recently found rules to improve the performance of the engine, especially during rule resolution searches. This rule cache operates invisibly and automatically.

Do not confuse the rule cache with the Rules Assembly cache, which covers only rules of the types that are translated to Java, and facilitates fast access to the compiled CLASS files.

To see whether the rules cache is enabled on your node and the date and time it was last initialized, review the Node Summary area of the Performance tool full details display.

Review the Database Access Counts area of that display to assess the fraction of rules read in your requestor session that was accessed from the rule cache rather than through PegaRULES database reads.

Use the DB Trace tool to assess the effectiveness of the rule cache for the whole node, in detail.

Determining the current size

Use the System Management Application to view the current rule count and size in bytes of the rule cache.

  1. From the Designer Studio, start the System Management Application usingSystem > Operations > System Management. You may be prompted for a username and password.
  2. Select a node.
  3. Click Memory Management from the SMA left menu strip. In the right panel, locate the table row labeled Rule Instance in the Caches group.

Changing the maximum size

To see a current rule count and the size in kilobytes of the rule cache, start the System Management Application (> System > Operations > System Management App), select a node, and click the Memory Management menu item. Look for the row labeled Rule Instance in the Cache grouping.

To change the size of the rule cache, adjust the following prconfig Dynamic System Setting:

Dynamic System Setting: prconfig/cache/instancecountlimit/default

The prconfig/cache/instancecountlimit/default setting controls the number of rules allowed in the rule cache.

The following describes the valid values for this Dynamic System Setting:

Value Description

Integer. This value sets the maximum size of the rule cache in number of rules (not size in bytes) stored in the rule cache. If this setting is not defined, the default is 3,000 entries.

Caution: Change this setting with care. Prconfig Dynamic System Settings can have broad impact on the operation of your system.

Detecting long waits

The PEGA0038 alert indicates that a requestor has waited longer than 30 milliseconds (or another threshold you can set in the prconfig.xml file) for access to the rule cache.

Disabling the Rule Cache

As a diagnostic aid to be used in specific situations, you can use the System Management application to temporarily disable the rule cache. This event is recorded in the Alert log as an alert of type PEGA0022. The corresponding alert when you re-enable the cache is PEGA0023. See PDN articles Understanding the PEGA0022 Alert and Understanding the PEGA0023 alert.

Caution: Use this System Management application only when necessary and for short intervals, as system performance is impaired when the rules cache is disabled.

Related Topics IconRelated terms