How to use the cachios.get function in cachios

To help you get started, we’ve selected a few cachios examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cheapsteak / npmcharts.com / packages / server / routes / api.js View on Github external
router.get('/downloads*', async (req, res) => {
  const proxiedPath = `https://api.npmjs.org${req.path.replace(/^api/, '')}`;
  try {
    return res.send((await cachios.get(proxiedPath)).data);
  } catch (exception) {
    console.error(exception);
  }
});

cachios

Simple axios cache wrapper using node-cache

MIT
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis

Popular cachios functions