Siebel Order Management Infrastructure Guide > PSP Engine > About Tuning Performance of PSP >
Defining a Cache Refresh Key
One complication caused by the PSP engine's extensive use of caching is that changes to reference data (such as price list line items) that are currently in cache are not reflected immediately after an updated version of the reference data is released. The PSP Cache persists until a Siebel Server is restarted. To enable administrative updates against a running system, every administration view that maintains data cached by PSP has a Clear Cache button that causes all PSP caches on all object managers in the Siebel Enterprise to purge a subset of the cached data for that particular business component. That subset of data is defined by the cache refresh key for the business component. When implementing PSP Cache through the PSP Generic Cache, you can control the granularity of the cache refresh by defining a cache refresh key for a business component. If no cache refresh key is defined, the business component is refreshed as a whole. To improve performance, you can use a cache refresh key to clear only a selected part of the cache. A business component can have only one cache refresh key. Some business components have a cache refresh key that comes preconfigured. For example, the Price List Item business component has a cache refresh key of Price List Id. This means that when the user clicks the Clear Cache button in the Price List list applet, only the selected price lists are cleared from the cache. You define a cache refresh key by adding user properties to the Row Set Transformation Toolkit business service. For each cache refresh key, one pair of user properties is required, as shown in Table 32.
Table 32. User Properties Required for a Cache Refresh Key
|
|
Cache Key: Price List Item |
Price List ID |
Cache Key: [BC Name] |
[Key Field 1], [Key Field 2] |
NOTE: You must recompile and distribute the SRF for your changes to take effect.
Search Specification and Cache Refresh Key
If a cache refresh key is defined for a business component, then every query against that business component must provide the cache key field values in its Search Specification or in the Cache Search Specification input argument. NOTE: Failure to specify the cache refresh key values will result in an error.
Use the Cache Search Specification input argument to avoid unnecessary clauses in the Search Specification executed by the database. The transform will look first at the Cache Search Specification, and then at the Search Specification to identify cache key values. The syntax and structure of the Cache Search Specification input argument are shown in the following example: [Price List Id] = {Context.Price List Id} AND [Price List Item Id] = {Row.Price List Item Id}
Row Set Transformation Toolkit Methods for PSP Cache Refresh
The Row Set Transformation Toolkit methods listed in Table 33, with their corresponding input arguments and output arguments support refreshing of the PSP cache:
Table 33. Row Set Transformation Toolkit Methods for PSP Cache Refresh
|
|
Get Cache Key |
Checks the cache key definitions for the specified business component and constructs a property set containing the cache key values for each selected row in the active business component. This enables multiselect when clearing cache entries (such as price lists). |
|
In: Business Component Name |
Out: Row Set |
Refresh Cache |
Clears the entire PSP cache. |
Refresh BC |
Clears all PSP cache entries for the specified business component. NOTE: Refresh BC does not clear the cache if the business component has a cache key defined.
|
|
In: Business Component Name |
Refresh BC On Cache Key |
Clears all PSP cache entries for the specified business component and cache key values. The input Row Set is typically the output of the Get Cache Key method. |
|
In: Business Component Name |
In: Row Set |
When the user clicks the Clear Cache button for business components without a cache key, the Refresh BC method is called directly by a run-time event. For business components with a cache key (for example, Price List Item has one preconfigured), the methods Get Cache Key and Refresh BC On Cache Key are invoked by a workflow that is triggered by a run-time event.
|