node-cacher icon indicating copy to clipboard operation
node-cacher copied to clipboard

Dont cache (set on the fly)

Open eugenioclrc opened this issue 9 years ago • 3 comments

Sometimes yo need to avoid cache on certains errors;

app.get('/dont-cache-onthefly', cacher.cache('day'), function(req, res) {
  // some complex stuff
  // if have an error response dont cache it:
    req.noCaching = true;
  // endif

  res.send(complexStuff)
})

eugenioclrc avatar Nov 08 '15 12:11 eugenioclrc

This looks good! I am away from my computer but can get this merged and published later today

addisonj avatar Nov 08 '15 17:11 addisonj

Hi @addisonj could you approve the pull request and publish the module? :pray:

eugenioclrc avatar Jan 06 '16 22:01 eugenioclrc

Dang! Sorry to have spaced this for so long,I blame the holidays....

I noticed one latent semicolon in the test fixture and forgot to circle back on it. If you want to fix it, feel free otherwise I will fix when I merge (hopefully later today)

Thanks for the reminder!

On Wed, Jan 6, 2016, 3:07 PM Eugenio [email protected] wrote:

Hi @addisonj https://github.com/addisonj could you approve the pull request and publish the module? [image: :pray:]

— Reply to this email directly or view it on GitHub https://github.com/addisonj/node-cacher/pull/28#issuecomment-169477807.

addisonj avatar Jan 10 '16 19:01 addisonj