Class: DataCache

DataCache

内存缓存数据对象类,与 localStorage API 保持一致


new DataCache()

Source:

Methods


clear()

清空

Source:

getItem(key) → {*}

获取值

Parameters:
Name Type Description
key String
Source:
Returns:
Type
*

key(index) → {*}

取得第 index 个数的 key

Parameters:
Name Type Description
index Number
Source:
Returns:
Type
*

removeItem(key) → {void}

删除一个值

Parameters:
Name Type Description
key String
Source:
Returns:
Type
void

setItem(key, value)

设置值

Parameters:
Name Type Description
key String
value *
Source: