my.setStorageSync
Store synchronously the data in the specified key in the local cache.
This is a synchronous interface.
Sample Code
copy
my.setStorageSync({
  key: 'currentCity',
  data: {
    cityName: 'London',
    adCode: '330100',
    spell: ' London',
  }
});Parameters
| Property | Type | Required | Description | 
| key | String | Yes | Cache data key. | 
| data | Object/String | Yes | Data to be cached. |