async _setTTL() {

      if (!this.tableCreated) {
        throw new Error('Table is not created yet');
      }

      try {
        
        // Check if the TTL is already set
        const isTTLSet = await this._isTTLSet();
        if (isTTLSet) {
          return;
        }

        const params = {
          TableName: this.tableName,
          TimeToLiveSpecification: {
            AttributeName: 'expire',
            Enabled: true
          }
        }

        const res = await this.client.updateTimeToLive(params);
        return res;

      } catch (err) {
        throw err;
      }

    }
Sets the Time-to-Live (TTL) for the table. TTL use the expire field in the table.
See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html

@return {Promise} A promise that resolves when the TTL is successfully set.
@throws {Error} Throws an error if the table is not created yet.
@returns {Promise}