# wx.removeStorage(Object object)

Removes the specified key from the local cache.

# Parameters

# Object object

Attribute Type Default Required Description
key string Yes The specified key in the local cache
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

# Sample Code

wx.removeStorage({
  key: 'key',
  success (res) {
    console.log(res)
  }
})
try {
  wx.removeStorageSync('key')
} catch (e) {
  // Do something when catch error
}