IBM Worklight - App data is not cleared after it is uninstalled from BB9900 device

I am developing an application using IBM Worklight.

In my app, I am using WL.encryptedCache API to store user preferences: Open, Read and Write functions are used.

When the application is installed for the first time and the user sets the preferences, I write the preferences to the cache.

Once the application is closed and opened, this encrypted cache is read again. I am able to successfully read the preferences as well.

But, the requirement is that the preferences should be deleted when the application is deleted or uninstalled.

When I uninstall the application and re-install, I see that the preferences are not cleared. I am still able to read the preferences from the encryptedCache.

This behavior occurs only on BB OS7 platform. All other platforms - BB10, iPhone and Android works fine.

Is there any solution to this issue?

Answers


Uninstalling an application is a function of the device OS; Worklight does not have control over that IMO.

Maybe what you may need to do is tweak the application's config.xml > aggressiveCacheAge property. Review the BlackBerry documentation for rim:cache element:

<rim:cache disableAllCache=["true" | "false"]
           aggressiveCacheAge="time"
           maxCacheSizeTotal="size"
           maxCacheSizeItem ="size" />

aggressiveCacheAge The aggressiveCacheAge attribute specifies the amount of time, in seconds, to cache items that are not governed by directives in the HTTP header.

By default, if you do not specify this attribute, these items are kept for 2592000 seconds (30 days). Settings higher than this value are ignored.

This attribute is optional.

I am not sure this will help. But try playing with the value you give to this property and see how it behaves after you uninstall an app, or quit an app and re-open it.


Need Your Help

How to do this tip-bubble?

html

How is that tip bubble circled in orange refereed as? How I can do that on a given text in html?