How to use the apicache.getIndex function in apicache

To help you get started, we’ve selected a few apicache 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 Asing1001 / movieRater.React / src / server.tsx View on Github external
app.get('/api/cache/index', (req, res) => {
  res.json(apicache.getIndex())
})
github pagesource / universal-react / server / middlewares / pageCache.js View on Github external
const getCacheIndex = res => {
  const cacheIndex = {};
  if (redisClient) {
    redisClient.keys('*', (err, keys) => {
      cacheIndex.memCacheIndex = apiCache.getIndex();
      cacheIndex.redisIndex = keys;
      res.json(cacheIndex);
    });
  } else {
    cacheIndex.memCacheIndex = apiCache.getIndex();
    res.json(cacheIndex);
  }
};
github Asing1001 / movieRater.React / dist / server.js View on Github external
app.get('/api/cache/index', (req, res) => {
    res.json(apicache.getIndex());
});
//static content
github quran / quran.com-frontend / server / routes.js View on Github external
server.get('/api/cache/index', function(req, res, next) {
    return res.status(200).send(apicache.getIndex());
  });
  server.get('/api/cache/clear', function(req, res, next) {

apicache

An ultra-simplified API response caching middleware for Express/Node using plain-english durations.

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis