Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| key | String | Yes | Storage key identifier |
| data | Object/String | Yes | Data to store |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Limits
- Single data item: max 200KB
- Total storage per Mini Program: max 10MB
Code Example
Related APIs
my.getStorage
Get stored data
my.setStorageSync
Store data synchronously