Results of GET Request inside block are being cached and not updating when GET request values are changed I have a block plugin that contains a form that performs a get request and reloads the current page. Currently it's set to allow a user to submit a state from a drop down box to be used as a filter. 

This issue I'm having is the results from the get request are cached. It works after clearing the cache but right after, once I submit again with a new value for the dropdown the results do not update on the page, even though I can clearly see that the get request has changed. Below is the code I currently have

public function build() {
    $request = \Drupal::request();
    /* GET Variables */
    $state = (empty($request-&gt;get('state')))?'':$request-&gt;get('state');

    $render = '
    &lt;form method="GET" class="relief-network-form"&gt;
    &lt;br/&gt;
    &lt;strong&gt;State:&lt;/strong&gt;&lt;br/&gt;
    &lt;select class="state" name="state"&gt;
        &lt;option value=""&gt;Pick One&lt;/option&gt;
        &lt;option value="AL"&gt;Alabama&lt;/option&gt;
        &lt;option value="AK"&gt;Alaska&lt;/option&gt;
        &lt;option value="AZ"&gt;Arizona&lt;/option&gt;
        &lt;option value="AR"&gt;Arkansas&lt;/option&gt;
    &lt;/select&gt;

    &lt;input type="submit" value="Filter"&gt;
    &lt;/form&gt;';
    return array(
        'test'    =&gt; [
            '#type'  =&gt; 'html_tag',
            '#tag'   =&gt; 'p',
            '#value' =&gt; 'State:'.$state.'-',
        ],
        'form'       =&gt; [
            '#type'     =&gt; 'inline_template',
            '#template' =&gt; $render,
        ],
    );
}


When submitting this form after the cache is cleared it displays the proper state in the p tag above the form, but afterwards it never changes. I have a feeling it has to do with using cache tags after reading the documentation here https://www.drupal.org/docs/8/api/render-api/cacheability-of-render-arrays
but to be honest I'm having trouble making sense of it, and I'm not sure how I would apply the examples to the current situation.
Is there a way to prevent the results of a GET request inside a block plugin from being cached?
You don't need cache tags, you need a cache context for the query key state:

$build['#cache']['contexts'][] = 'url.query_args:state';