Skip to content

Commit

Permalink
Half cache expiry times for page > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lim Chee Aun committed Mar 29, 2016
1 parent 6d503f6 commit dfee460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Expand Up @@ -308,7 +308,7 @@ app.get(/^\/(news|news2|newest|ask|show|jobs)$/, function(req, res){
errorRespond(res, err);
return;
}
cache.set(cacheKey, data, CACHE_EXP);
cache.set(cacheKey, data, page > 1 ? CACHE_EXP/2 : CACHE_EXP);
res.jsonp(data);
});

Expand Down

0 comments on commit dfee460

Please sign in to comment.