移动端LocalStorage缓存资源方案
安装
npm install mobot
使用
mobottimeout = 10000; // 请求超时10smobotprefix = 'mobot-'; // LocalStorage前缀mobotexpire = 24 * 7; // 7天的缓存时间mobot; // 获取本地缓存资源mobot;// {// url: string // 资源地址// key: string // 索引名// unique: string // hash值// content: string // 资源内容// type: string // 资源类型// stamp: number // 什么时候缓存的// expire: number // 多久之后过期// } // 删除本地缓存资源mobot // 清空本地所有缓存资源mobotclear