Introduction axios + lru-cache install yarn add axios yarn add lru-cache yarn add lt-xhr usage import xhr, { Xhr } from 'lt-xhr' class TestSrv { getList(id) { return xhr({ url: `/test`, cache: true, // 缓存 params: { id, }, }); } }