getStorageInfo
Bắt đầu hỗ trợ ở phiên bản:
- SDK: 2.43.0
import { nativeStorage } from "zmp-sdk/apis";
Lấy thông tin của cache theo cơ chế đồng bộ.
Ví dụ
const { currentSize, limitSize } = nativeStorage.getStorageInfo();
Kết quả trả về
API trả về Promise<StorageInfo>
chứa thông tin của cache.
StorageInfo
Name | Type | Default | Description | Minimum Version |
---|---|---|---|---|
currentSize | number | Không gian hiện tại bị chiếm (tính bằng KB) | 2.43.0 | |
limitSize | number | Giới hạn kích thước không gian (tính bằng KB) | 2.43.0 |