Fragen\GitHub_Updater\API::set_transient PHP Метод

set_transient() защищенный Метод

Used to set_site_transient and checks/stores transient id in array.
protected set_transient ( string $id, mixed $response ) : boolean
$id string Transient ID.
$response mixed Data to be stored.
Результат boolean
    protected function set_transient($id, $response)
    {
        $repo = isset($this->type) ? $this->type->repo : 'ghu';
        $transient = 'ghu-' . md5($repo);
        $this->response[$id] = $response;
        /**
         * Filter to allow advanced caching plugins to control transient saving.
         *
         * @since 6.0.0
         *
         * @param string $id       Transient ID.
         * @param mixed  $response Data to be stored.
         *
         * @return bool
         */
        if (false === apply_filters('ghu_use_remote_call_transients', true, $id, $response)) {
            return false;
        }
        set_site_transient($transient, $this->response, self::$hours * HOUR_IN_SECONDS);
        return true;
    }