Open ouyuran opened 3 years ago
I've tried to cache an image url but failed.
const res1 = await api.get(image-url); const res2 = await api.get(image-url); console.log(res1.request.fromCache); console.log(res2.request.fromCache); console.log(await api.cache.length());
The output is undefined, undefined and 0.
I think the reason might be it uses JSON.parse(res.data) to serialize data before setItem.
JSON.parse(res.data)
setItem
What's more, can we try to cache the response with content-type stream?
If you you guys think they are valuable features I'll be happy to implement they.
I've tried to cache an image url but failed.
The output is undefined, undefined and 0.
I think the reason might be it uses
JSON.parse(res.data)
to serialize data beforesetItem
.What's more, can we try to cache the response with content-type stream?
If you you guys think they are valuable features I'll be happy to implement they.