def METHOD_NAME(self, key, append_data):
    try:
        self._cachecol.update_one(
            {'type': key},
            {
                # Add to set will not add the same library again to the list unlike set.
                '$addToSet': {'data': append_data},
                '$setOnInsert': {'type': key, 'date': datetime.utcnow()}
            },
            upsert=True
        )
    except OperationFailure as op:
        logging.debug("Admin is required to append to the cache: %s", op)