How To Set up external Reference Data in Portrait Foundation


Portrait Foundation has an external Reference Data (eRDG) editor built into the out-of-the-box Agent Manager.
When defining your eRDG groups, it is important to understand how frequently they are likely to be changed.
There is a setting called "Max group stale time in minutes" found in the Caching section of the Portrait Management Console (MMC).

Max group stale time in minutes

A value of zero (the default) will mean that eRDG data will effectively not be cached, because at runtime the server will always return to the database to extract all possible values. A value of (say) 10 will mean that the server will retrieve eRDG values from the database if more than 10 minutes has passed since it last checked, otherwise it will use the reference data cache.

  • The benefit of having a value of zero is that you can guarantee that the eRDG values being used at runtime will always be up to date, but the downside is that it is less efficient because the Reference Data (RD) cache is never used for those external RDG types.
  • The benefit of having a positive integer value of X minutes is that the system will run more efficiently, using the in-memory RD cache rather than having to make an expensive round trip to the database every time it needs to look up an eRDG value. If you don't change the eRDGs very often, then this is a good idea. The downside is that all Portrait Application Servers can be up to X minutes out of date while they are still using the cached value when the actual value has been changed.
Restarting the Portrait services flushes the caches, and so ensures that they are no longer out of date, but this defeats the object of using eRDG values which can be changed at runtime.

If you wish to make a critical change to eRDG values (i.e. a change that would affect business decisions), then we recommend that you change the value of the above Max group stale time in minutes setting to zero, make the eRDG changes, and then wait until the Portrait Foundation servers have al updated themselves, and then reset the value back to your original positive integer.
Note that for this MMC change to be persisted across the Portrait servers in the farm, they must all have been individually defined in advance within the MMC.
UPDATED:  April 19, 2017