cancel
Showing results for 
Search instead for 
Did you mean: 

Cache not synchronized between portal nodes

Former Member
0 Kudos

Hello.

We are having a problem with a service using a cache api (com.sapportals.wcm.util.cache.ICache from bc.sf.service.cache_api.jar). The problem is fairly hard to describe, so bear with me (long description)

Environment (+applications) description:

The portal we have is composed of 4 nodes (2 machines with 2 server nodes each, running ep6 sp2). We are using a service as described above, that basically parses a folder structure from the km repository and puts it into an object and the object into the cache. The objects are modified whenever the folder structure is modified (we have an event listener on a specific folder). Let's call this serviceApp. We have then another application that uses the cached object to display a tree in an iView. Let's call this iViewApp.

Problem description:

Whenever the folder in the km folders is modified, the cached object is modified by the serviceApp. If you are accessing the portal on -say- node1, then the cached object is immediately available to iViewApp. But if you access then the portal from -say- node2 and open the iViewApp, the updated object is not available (an older "version" of the cached object is displayed). The cached object is updated only if modifications in the km folder are performed on node2 (and hence the service instance from node2 rebuild the cached object). So: on node1 the cached object is updated. On node2 it is NOT updated. Also, the modifications performed in the km folders on nodeX are immediately available on nodeX but not on the other nodes (only after some time they become available). Also, modifying km folders on nodeX raises an event (caught by the handler running on nodeX but NOT by the handlers on other nodes). <i>(***)</i> When the modifications in km folders become available on the other nodes (due to synchronization, I reckon), the event handlers do not react (hence, we think an event is not raised).

Question no1:

We have come to the conclusion that maybe the problem is that the caching memory zone is not synchronized between the server nodes. Any ideas how to fix this?

Question no2:

Which api is better to use for caching? The ICache from the bc.sf.service.cache_api.jar or the ICacheService from com.sap.portal.compatibility50.cacheapi.jar? Or maybe another one (we only know of these 2)?

Question no3:

Is the <i>(***)</i> conclusion correct?

Thank you. Sorry again for the long post.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Silviu,

We are facing the same problem with the cached objects across nodes. Would you share any information/solution to resolve this ?

Regards,

Melwyn

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Melwyn

Somehow you can try to use the Portal notification API. It works even in clustered environment. Though it's not the same as cluster-wide cache:

com.sapportals.portal.prt.service.notification.INotificationService

Regards, Siarhei