code: function() {
                  if (hasCache) {
                      queueDb = new Dexie('podQueues');
  
                      queueDb.version(1)
                          .stores({
                              waitQ: '[owner+threadId+uniqueId], owner, threadId, uniqueId, message'
                          });
  
                      if (enableCache) {
                          db = new Dexie('podChat');
  
                          db.version(1)
                              .stores({
                                  users: '&id, name, cellphoneNumber, keyId',
                                  contacts: '[owner+id], id, owner, uniqueId, userId, cellphoneNumber, email, firstName, lastName, expireTime',
                                  threads: '[owner+id] ,id, owner, title, time, [owner+time]',
                                  participants: '[owner+id], id, owner, threadId, notSeenDuration, name, contactName, email, expireTime',
                                  messages: '[owner+id], id, owner, threadId, time, [threadId+id], [threadId+owner+time]',
                                  messageGaps: '[owner+id], [owner+waitsFor], id, waitsFor, owner, threadId, time, [threadId+owner+time]'
                              });
  
                          db.open()
                              .catch(function(e) {
                                  console.log('Open failed: ' + e.stack);
                              });
  
                          db.on('ready', function() {
                              isCacheReady = true;
                          }, true);
  
                          db.on('versionchange', function(event) {
                              window.location.reload();
                          });
                      }
                  }
                  else {
                      console.log(CHAT_ERRORS[6600]);
                  }
              }
docs: *****************************************************
  P R I V A T E   M E T H O D S            *
  *****************************************************