Skip to Content
0
Jan 12, 2023 at 09:57 AM

UI5 personalization container cache problem

250 Views

Hello people,

we have built a launchpad service with 6 apps in the BTP.

These apps all have a dropdown field to select a plant. This selection should be stored in the personalization container, so that this info can then be retrieved in the other apps (the employee should not have to select his plant every time).

Now a strange behavior occurs.

We have the same loading logic everywhere:

4 of the 6 apps "work together". The other 2 apps form their own group.

Say, if I select something in app A, the selection also appears in app B, C and D. But not in App E. Only when I completely reload App E (clear cache), the selection from App A appears. So it seems to be a problem with the cache.

I then noticed that the 4 apps are running in one iframe and the other two apps are running in another iframe.

Both iframes use the same personalization container according to config from ui5appruntime.html. However, we actually have different cache settings here. Although the iframes have the same container ID, they have different cacheBusterToken. Example:

 

// APP 1-4

"services": {

"Personalization": {

"adapter": {

"module": "sap.cf.adapters.PersonalizationAdapter",

"config": {

"storageType": "REMOTE_STORAGE",

"remoteStorageUrl": "portal/rest/v1/personalizationsiteId=sameID&cacheBusterToken=1673511788777",

"isAppRuntime": true

}

}

}

}

// APP 5-6

"services": {

"Personalization": {

"adapter": {

"module": "sap.cf.adapters.PersonalizationAdapter",

"config": {

"storageType": "REMOTE_STORAGE",

"remoteStorageUrl": "portal/rest/v1/personalizationSiteId=sameID&cacheBusterToken=1673511766666",

"isAppRuntime": true

}

}

}

}

As I said, the programming is the same, but for some reason the apps are loaded in different iframes.

Can anyone give me a hint?
- Why 2 iframes?
- Why different caches?
- How can i solve this?