-
Notifications
You must be signed in to change notification settings - Fork 19
Local Storage
This page will describe what data is saved to window.localStorage and where the saves occur. We will refer to window.localStorage as just "localStorage" for the rest of this guide.
src/Application.js uses localStorage if the application configuration "enableCaching" is set to true. All sdata requests are stored in localStorage using a key "sdata.cache". The cache is cleared out when the application init occurs, via the initCaching method: https://github.com/SageSalesLogix/argos-sdk/blob/2.1/src/Application.js#L175
src/ErrorManager.js uses localStorage to store error messages under the key "errorlog". This data is not automatically cleared, and would need to be cleared by the user via browser settings or through argos-saleslogix application settings "Clear Storage". A customization could override the save method of ErrorManager to overwrite this functionality.
Any customization using src/PersistentStorage.js, which uses localStorage under the covers would need to evaluate the data they are saving using that class. It is has been marked as deprecated and is no longer used in the SDK.
src/Application.js has several keys saved to localStorage:
- "navigationState" - the navigation state when transitioning between views and is cleared on logout
- "credentials" - the users credentials if the user selects "remember me" on the login page and is cleared on logout
- "preferences" - the users preferences via the App.persistPreferences function and is not cleared automatically