Skip to content

Instantly share code, notes, and snippets.

@stockholmux
Created May 17, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stockholmux/5319c6cdd19775a8a58846c374e1f55b to your computer and use it in GitHub Desktop.
Save stockholmux/5319c6cdd19775a8a58846c374e1f55b to your computer and use it in GitHub Desktop.
client.multi([
['SETBIT', 'user123', 123, 1],
['BITOP', 'AND','123:sawboth','user123','article1:today', 'article3:today'],
['GETBIT', '123:sawboth', 123]
]).exec((err, result) => {
let sawboth = result[2];
console.log('123 saw both articles: ', !!sawboth);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment