kwhitley / apicache

Simple API-caching middleware for Express/Node.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getPerformance shows `[null, null]`

derekchiang opened this issue · comments

I've followed the instruction in the README to add a route for monitoring cache performance:

app.get('/api/cache/performance', (req, res) => {
  res.json(apicache.getPerformance())
})

However, when I visit this route, all I get is the following JSON response:

[null,null]

Does that mean that my cache is not being hit at all?

I realized that I had to set trackPerformance: true