1. 首页
  2. 数据库
  3. 其它
  4. cachios:使用节点缓存的简单axios缓存包装器 源码

cachios:使用节点缓存的简单axios缓存包装器 源码

上传者: 2021-02-26 08:05:19上传 ZIP文件 69.49KB 热度 20次
卡奇奥斯 使用node-cache简单axios缓存包装器。 Cachios旨在替代以下模式: const axios = require ( 'axios' ) ; const resources = { } ; function getResource ( id ) { if ( ! resources [ id ] ) { // actually retrieve the resource return axios . get ( `/api/thing/ ${ id } ` ) . then ( ( resp ) => { // store the
下载地址
用户评论