getStorageInfo
import { nativeStorage } from "zmp-sdk";
Lấy thông tin của cache theo cơ chế đồng bộ.
Ví dụ
const { currentSize, limitSize } = nativeStorage.getStorageInfo();
Xem hướng dẫn xử lý lỗi và bảng mô tả chi tiết mã lỗi tại đây.
Kết quả tr ả về
API trả về Promise chứa thông tin của cache.
StorageInfo
| Property | Type | Required | Description |
|---|---|---|---|
| currentSize | number | No | Không gian hiện tại bị chiếm (tính bằng KB) |
| limitSize | number | No | Giới hạn kích thước không gian (tính bằng KB) |