no banners board sadd fix

merge-requests/208/head
fatchan 5 years ago
parent 5ef7da7100
commit 17f175d977
  1. 4
      db/boards.js

@ -16,7 +16,9 @@ module.exports = {
board = await db.findOne({ '_id': name });
if (board) {
cache.set(`board_${name}`, board);
cache.sadd(`banners_${name}`, board.banners);
if (board.banners.length > 0) {
cache.sadd(`banners_${name}`, board.banners);
}
} else {
cache.set(`board_${name}`, 'no_exist', 'ex', 3600); //1 hour expiry just so it doesnt grow indefinitely
}

Loading…
Cancel
Save