public function get($name, $default) {
        $name = trim((string)$name);
        if (empty($name)) {
            return $default;
        }

        // Check if option value is cached already
        if($this->ydb->has_option($name)) {
            return $this->ydb->get_option($name);
        }

        // Get option value from DB
        $table = YOURLS_DB_TABLE_OPTIONS;
        $sql = "SELECT option_value FROM $table WHERE option_name = :option_name LIMIT 1";
        $bind = array('option_name' => $name);

        // Use fechOne() to get array('option_value'=>$value), or false if not found.
        // This way, we can effectively store false as an option value, and not confuse with false as the default return value
        $value = $this->ydb->fetchOne($sql, $bind);
        if($value !== false) {
            $value = yourls_maybe_unserialize( $value['option_value'] );
            // Cache option value to save a DB query if needed later
            $this->ydb->set_option($name, $value);
        } else {
            $value = $default;
        }

        /**
         * We don't cache value if option is not set, to make a difference between "not found: returning false"
         * and "found, and value is false".
         * This way, we can:
         * $check = yourls_get_option('doesnt_exist'); // false
         * yourls_add_option('doesnt_exist', 'value'); // will work, because check on has_option() will return false
         */

        return $value;
    }