Hi colleagues!
Today is a good day to talk about such thing as a cash.. Oh no, sorry, I mean "cache" - not a money, unfortunately. :smile:
Wikipedia tells:
Cache (from the French. cacher - «hide", pronounced [kæʃ] - «cache") - an intermediate buffer with fast access containing information that may be requested with the highest probability. Accessing data in the cache is faster than the original sampling data from the slower memory, or a remote source, but its volume is considerably limited as compared with the initial data storage.
There is a standard "highly professional" comment on any issue in the SAP PI - "Update the cache." Indeed, it is often helpful. Why?
Let's deal.
I assume that in times then the architecture of SAP PI was developed, the developers team had two problems:
Most likely, the idea was to use the "cache" as an intermediate storage for all interface objects.
Overall caching scheme in the PI looks like this:
Pic. 1: Cache architecture in SAP PI
Update of the cache is starting automatically after object activation took place in the ESR or Integration Directory; the process of update can also be initiated manually.
When object activation occurs in Enterprise Service Repository - PI takes the following sequence of actions:
"Consumers" are the following cache mechanisms:
In addition to the chain, there is SLD-caches in the ESR and Integration Directory:
SLD-caches can also be forced to update.
There are a number of tools to monitor the status and contents of the cache mechanisms in PI, as well as for manual cache updates.
The first tool is a part of the administration tools located on the home page of PI:
Select the tab "Repository", a group of instruments "Lock and Cache Administration", the tool "Java Virtual Machine Cache".
As you can see, virtual machine has several different cache mechanisms. We are particularly interested in the SLD cache. On this page we can force an update the cache manually by clicking "Refresh Selected Caches".
You can also use "Data Cache" in the same group of tools:
Pic.4: CPACache Update.
Pic.5: Mapping Cache update
You can force an update of CPACache and Mapping Cache here. When you click on the link "Refresh" next to the appropriate cache mechanism - PI will open the page of update tool.
CPACache update has two options: "Delta" and "Full".
Delta-update tries to minimize the syncronization time and update only items that have been changed since the last update. Option "Full" conducts a full synchronization of ESR and Integration Directory repositories with CPACache.
TIP: You can copy URLs for CPACache and Mapping Cache updates and use them directly.
"Directory" tab contains the same tools:
Pic.7: "Directory" tab - SLD Cache update
Pic.8: "Directory" tab - CPACache refresh
These tools are effective when you want quickly eliminate possible cache error during interface execution.
But it's not enough for a complete analysis or troubleshooting.
You can find more advanced tools in the "Configuration and Monitoring Home" toolset, located on the initial PI page:
Go to http://<host>:<port>/dir and select "Configuration and Monitoring Home" in the lower right corner.
You will see the following portal:
Pic.9: Monitoring and customizing tools for SAP PI
You can choose from the menu on top of page - what part of PI you want to see: Integration Engine, Adapter Enginge, Business Process Engine or Mapping Runtime.
Pic.10: Cache Monitor for Integration Engine (ABAP)
Pic. 11: Cache Monitor for Adapter Engine (J2EE)
Pic. 12: Cache Monitor for mappings (J2EE)
Choose "Cache Monitor" and enjoy the power over all caching mechanisms of SAP PI. :smile:
Pic.13: Cache Monitor for Adapter Engine — content view
Here you can see what is in the cache, synchronize individual objects or entire cache.
There are some useful cache-related tools for developers you can use to monitor and control the caching process.
Open the Enterprise Service Builder, choose "Environment":
Pic. 14: Cache tools in Enterprise Service Builder
The item "Clear SLD Data Cache" allows you to reset all cached objects from SLD, next time all objects will be read directly from SLD (not from cache).
This tool is useful when you just created a new software component in SLD, but it's not visible in the list during the import to the ESR.
The item "Cache Status Overview" calling the monitor for Cache Refresh Notification Service.
For example, the monitor now shows that some development object was activated and this change was successfully provided to Integration Directory cache:
Pic. 15: successful object activation message in the ESR cache monitor
The life of this object can be traced in the <strong> Integration Directory </ strong> now. Run the Integration Builder, call the menu "Environment" -> "Cache Status Overview":
Pic. 16: successful object activation message in the Integration Directory cache monitor
The monitor shows that the activated object has been successfully transferred to "consumers": Integration Cache (ABAP) and Adapter Engine Cache (J2EE).
Here you can also refresh SLD Cache, which stores a list of Business Systems from SLD. After a cleaning, the first import of business systems would start direct reading of business systems list from the SLD.
If you want to see cache of ABAP part (Integration Server itself or connected SAP system) - use transaction SXI_CACHE:
Pic. 17: SXI_CACHE transaction
You can also find tools for delta- and full cache updates in the transaction menu:
Pic.18: SXI_CACHE menu
That's all about cache universe in PI for now.
If you want more information, you can use these sources:
SDN article "How to Handle XPI Caches in SAP NetWeaver 2004s (NW7.0)"
Analyzing the Runtime Cache (help.sap.com, PI 7.4)
Runtime Caches (help.sap.com, NW 7.4)
Good luck in your integrations!
Alexey Petrov
Freelance Integration Expert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |