code: async function _handleChangeAndPush(event, doc, timestamp) {
    // Update the resource content and set dirty
    // TODO: Remove one of these steps since it does encryption twice
    // in the case where the resource does not exist yet
    const resource = await getOrCreateResourceForDoc(doc);
  
    const updatedResource = await store.updateResource(resource, {
      name: doc.name || 'n/a',
      lastEdited: timestamp,
      lastEditedBy: session.getAccountId(),
      encContent: await encryptDoc(resource.resourceGroupId, doc),
      removed: event === db.CHANGE_REMOVE,
      dirty: true,
    });
  
    // Debounce pushing of dirty resources
    logger.debug(`Queue ${event} ${updatedResource.id}`);
  }
docs: ~~~~~~~ // HELPERS // ~~~~~~~ //