# storage

Each Weixin Mini Program can have its own local cache, which can be accessed via wx.setStorage / wx.settStorageSyncwx.getStorage / wx.getStorageSyncwx.clearStorage / wx.clearStorageSyncwx.removeStorage / wx.removeStorageSync Read, write and clean the local cache.

# Separation strategy

For the same WeChat user, the same Weixin Mini Program storage is capped at 10MB. Storage is isolated by user dimension, user A can not read user B's data on the same device; Different Mini Programs cannot read or write data to each other.

Plugin isolation strategy

  1. The same Weixin Mini Program using different plug-ins: Between different plug-ins, plug-ins and Mini programs between storage is not interoperable.
  2. Different Weixin Mini Program use the same plug-in: The same plug-in storage is not interoperable.

# Cleanup Strategy

The local cache is cleaned at the same time as the code packet. The local cache will only be cleaned when the code block is cleaned.