Chuyển tới nội dung chính

getStorageInfo

import { nativeStorage } from "zmp-sdk/apis"; // >= 2.43.0

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

NameTypeDefaultDescriptionMinimum Version
currentSizenumber

Không gian hiện tại bị chiếm (tính bằng KB)

2.43.0
limitSizenumber

Giới hạn kích thước không gian (tính bằng KB)

2.43.0