Goldziher / axios-simple-cache-adapter

Configurable axios cache adapter for node and the browser

Home Page:https://www.npmjs.com/package/axios-simple-cache-adapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to know if the response comes from the cache ?

svengau opened this issue · comments

commented

thanks for this really simple library, and easy to configure.

Other libs provide an extra parameter on the response (e.g response.request.fromCache, or response.cached) to indicate if the reponse comes from the cache or not. How is it possible to know it with axios-simple-cache-adapter ?

thanks for this really simple library, and easy to configure.

Other libs provide an extra parameter on the response (e.g response.request.fromCache, or response.cached) to indicate if the reponse comes from the cache or not. How is it possible to know it with axios-simple-cache-adapter ?

Hi there. Currently the only way to know is to run i debug=true, and see the log out.

Is this runtime behaviour you are looking for, or for dev only?

commented

It's handy to have this information, even in production.

It's handy to have this information, even in production.

Ok, PR welcome