Sets the transient for the license data.

@since  1.0.0

@return bool  Was the transient successfully set?
433422
private function setTransient() {
		return ! $this->getTransient() && set_site_transient( $this->getKey(), $this->getLicense(), $this->getExpiration( $this->getData() ) );
	}
85834
public function clear()
    {
        $expiry = $this->values['_expiry'] ?? null;
        parent::clear();
        $this->set('_changed', true);
        $this->set('_timestamp', time());
        if ($expiry)
            $this->setExpiry($expiry);
        return $this;
    }
180354
public function set($values)
    {
        if (! is_array($values)) {
            $values = array($values);
        }
        $this->values = $values;
        $this->snapshot();
        $this->tracker->markOverridden();
        return true;
    }
328441
public function set()
    {
        $args = func_get_args();

        if (count($args) == 2) {
            $this->attributes[$args[0]] = $args[1];
        } elseif (count($args) == 1 && is_array($args[0])) {
            $this->attributes = (array_merge($this->attributes, $args[0]));
        }

        return $this;
    }
216371
public function gc()
	{
		$prefix = $this->options['hash'] . '-cache-';

		foreach ($this->data as $key => $value)
		{
			if (substr($key, 0, strlen($prefix)) == $prefix)
			{
				$value = $this->data[$key];

				if ($this->isDataExpired($value))
				{
					unset($this->data[$key]);
				}
			}
		}

		return true;
	}
136213
public function set_update_transients() {
		if ( empty( self::$options_remote ) ) {
			return;
		}
		$plugin = Singleton::get_instance( 'Plugin', $this );
		$theme  = Singleton::get_instance( 'Theme', $this );

		add_filter( 'github_updater_add_admin_pages', [ $this, 'extra_admin_pages' ] );
		add_filter( 'site_transient_update_plugins', [ $plugin, 'update_site_transient' ], 10, 1 );
		add_filter( 'site_transient_update_themes', [ $theme, 'update_site_transient' ], 10, 1 );

		$plugin->get_meta_plugins();
		$theme->get_meta_themes();

		$current_plugins = get_site_transient( 'update_plugins' );
		$current_themes  = get_site_transient( 'update_themes' );
		set_site_transient( 'update_plugins', $current_plugins );
		set_site_transient( 'update_themes', $current_themes );

		remove_filter( 'github_updater_add_admin_pages', [ $this, 'extra_admin_pages' ] );
	}
549549
public function addKey( $key ) {
		/*
		 * @todo The majority of this method has been copied from
		 * Boldgrid\Library\Library\Notice\KeyPrompt\addKey() because the logic to add a key should
		 * be in this class and not the KeyPrompt class. that KeyPrompt method needs to be refactored.
		 */

		// When adding Keys, delete the transient to make sure we get new license info.
		delete_site_transient( 'bg_license_data' );
		delete_site_transient( 'boldgrid_api_data' );

		$data = $this->callCheckVersion( array( 'key' => $key ) );

		if ( is_object( $data ) ) {
			$this->save( $data, $key );
			return true;
		} else {
			return false;
		}
	}
733534
protected function shouldRegenerateId()
    {
        if (($this->idRequestsLimit) && ($this->requestsCount >= $this->idRequestsLimit)) {
            return true;
        }

        if (($this->idTtl && $this->regenerationTrace) && ($this->regenerationTrace + $this->idTtl < time())) {
            return true;
        }

        return false;
    }
900554
function has_features_enabled_license() {
            return (
                is_object( $this->_license ) &&
                is_numeric( $this->_license->id ) &&
                $this->_license->is_features_enabled()
            );
        }
825079
protected function _set()
	{
		// get the key for the cache identifier
		$key = $this->_get_key();

		// write the cache
		static::$redis->set($key, $this->prep_contents());
		if ( ! empty($this->expiration))
		{
			static::$redis->expireat($key, $this->expiration);
		}

		// update the index
		$this->_update_index($key);

		return true;
	}
1238920
public function commit() {
        if ($this->transTimes > 0) {
            $result = $this->_linkID->commit();
            $this->transTimes = 0;
            if(!$result){
                $this->error();
                return false;
            }
        }
        return true;
    }
589220
public function valid()
    {
        if ($this->counter > Settings::$maxRecurrences && -1 !== Settings::$maxRecurrences) {
            throw new MaxInstancesExceededException('Recurring events are only allowed to generate '.Settings::$maxRecurrences);
        }

        return (bool) $this->currentDate;
    }
505890
function has_active_license() {
            return (
                is_object( $this->_license ) &&
                is_numeric( $this->_license->id ) &&
                ! $this->_license->is_expired()
            );
        }
1095174
public function set(string $key, string $value, int $expire): bool {
		return ($expire === -1) ? $this->driver->set($key, $value) : $this->driver->setex($key, $expire, $value);
	}
1083488
public function initEngine()
    {

        if (!$this->setting) {
            return false;
        }

        foreach ($this->setting as $key => $value) {
            if (empty($key) || !property_exists($this->engine, $key)) {
                continue;
            }

            $this->engine->{$key} = $this->setting->{$key};
        }

        return true;
    }
109595
public function addKey() {

		/*
		 * @todo A section of this code has been duplicated in Boldgrid\Library\Library\Key\addKey()
		 * because the code for saving a key should be in the Key class and not the KeyPrompt class.
		 * This method needs to be refactored using that addKey method.
		 */

		// When adding Keys, delete the transient to make sure we get new license info.
		delete_site_transient( 'bg_license_data' );
		delete_site_transient( 'boldgrid_api_data' );

		$key = $this->validate();
		$data = $this->key->callCheckVersion( array( 'key' => $key ) );
		$msg = $this->getMessages();

		if ( is_object( $data ) ) {
			$this->key->save( $data, $key );
			wp_send_json_success( array(
				'message'   => $msg->success,
				'site_hash' => $data->result->data->site_hash,
				'api_key'   => apply_filters( 'Boldgrid\Library\License\getApiKey', false ),
			) );
		} else {
			$is_timeout = false !== strpos( $data, 'cURL error 28:' );
			wp_send_json_error( array( 'message' => $is_timeout ? $msg->timeout : $msg->error ) );
		}
	}
1200511
public function validate()
    {
        if (!parent::validate()) {
            return false;
        }

        if (empty($this->_paymentId)) {
            $this->setValidationError('Payment id not specified');
            return false;
        }
        return true;
    }