my.removeStorageSync

Remove cached data synchronously.

Supported types of mini programs: DSL

This is a synchronous interface.

Sample Code

copy
my.removeStorageSync({
  key: 'currentCity',
});

Parameters

PropertyType

Required

Description
keyStringYesCache data key.

Error code

Error code

Error message

Further action

2

Required parameter is empty

Make sure the data type of the key parameter is correct and the value is not empty.