my.removeStorage

Remove cached data.

This is an asynchronous interface.

Removing the webview embedded storage data will not remove the storage data of the Mini Program.

The cached data are user isolated, which means if user logs out wallet and logs in as a different user, the mini program will not be able to get previous user's cached data.

Sample Code

copy
my.removeStorage({
  key: 'currentCity',
  success: function(){
    my.alert({content: 'remove success'});
  }
});

Parameters

NameTypeMandatoryDescription
keyStringYesCache data key
successFunctionNoCallback function upon call success
failFunctionNoCallback function upon call failure
completeFunctionNoCallback function upon call   completion (to be executed upon either call success or failure)