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.

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 11 months ago

Package Health Score

70 / 100
Full package analysis

Similar packages