首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 缓存模块的JSON格式的数据存储在本地存储的容易。

缓存模块的JSON格式的数据存储在本地存储的容易。

资 源 简 介

$cache module A cache module for storing JSON like data in LocalStorage or IndexedDB(coming) easily. Pure JavaScript no library required. The script is useful for sharing data across scripts or pages. eg. store server side data as cache to reduce requests. Usage ``` // store data to internal _cache object. Automatic create structure if key is undefined. // can set multiple items in one go. $cache({ set: { "key": "abc", "parent.subitem.subSubitem": 123 } }); // get data. Returns data or null if undefined $cache({get: "parent.subitem.subSubitem"}); // clear data value to "" $cache({clear: "parent.subitem.subSubitem"}); // get back the whole _cache data object for debug purpose. $cache("debug"); // clear all cache $cache("clearAll"); ```
VIP VIP
0.168321s