Uncleared state after logout causes caching problem
tranquvis opened this issue · 2 comments
Hi
I am facing the following bug at gigya-android-sdk-core v5.0.0 .
Scenario:
- I have an account with a language set.
- I logout by calling
Gigya.logout
. - I login again by calling
Gigya.login
(application not closed before) . - After successfull login, I want to fetch the full account object including the languages field with
Gigya.getAccount
andextraProfileFields
set to "languages". - I expect to receive the languages but I don't, because the cached account object was used.
The reason for this bug seems to be that not the full state is cleared on logout.
On logout cachedAccount
in accountCacheService
is cleared, but the fields _lastRequestedInclude
and _lastRequestedProfileExtraFields
are not cleared. Gigya.login
updates cachedAccount
, but does not update _lastRequestedInclude
and _lastRequestedProfileExtraFields
. Consequently Gigya.getAccount
has the wrong information about the cached object.
Regards,
Andreas
Hi,
Issue has been reported and will be resolved in the upcoming core release.
Regards,
Tal
Hi,
_lastRequestedInclude & _lastRequestedProfileExtraFields were removed in version 5.1.0.
You are now able to use the account configuration settings in order to set a default include, extraProfileFields for your app.
The account caching will rely on it.
In order to clear the cache please use one of the avilable getAccount interfaces with invalidateCache options.