<commit_before>// This is the publication used to display the board list. We publish all the
// non-archived boards:
// 1. that the user is a member of
// 2. the user has starred
Meteor.publish('boards', function() {
  // Ensure that the user is connected
  if (! Match.test(this.userId, String))
    return;

  // Defensive programming to verify that starredBoards has the expected
  // format -- since the field is in the `profile` a user can modify it.
  var starredBoards = Users.findOne(this.userId).profile.starredBoards || [];
  check(starredBoards, [String]);<commit_msg>Remove cached board data when the client log out<commit_after>// This is the publication used to display the board list. We publish all the
// non-archived boards:
// 1. that the user is a member of
// 2. the user has starred
Meteor.publish('boards', function() {
  // Ensure that the user is connected. If it is not, we need to return an empty
  // array to tell the client to remove the previously published docs.
  if (! Match.test(this.userId, String))
    return [];

  // Defensive programming to verify that starredBoards has the expected
  // format -- since the field is in the `profile` a user can modify it.
  var starredBoards = Users.findOne(this.userId).profile.starredBoards || [];
  check(starredBoards, [String]);
{'fraction_non_alphanumeric': 0.10007639419404125, 'fraction_numerical': 0.0030557677616501145, 'mean_word_length': 3.548611111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3925326', 'n_tokens_mistral': 371, 'n_tokens_neox': 361, 'n_words': 166}