Excluding Array of Entry Ids Not Busting Cache
The cache tag is somewhat misunderstood and it tends to trip up even the most seasoned Crafters.

The best way to explain about the {% cache %} tag is to think of it as a snapshot in time. 

The first time the template runs, Craft saves the output to the database. It does not actually save queries.  On subsequent runs, Craft simply grabs the output from the cache. Again, it doesn't save state or variables, it simply saves the output.

Specifically, I see you have {% if %} tags inside {% cache %}. Those conditionals will only run once. The {% if %} tags won't re-execute and the output is going to be the same.

What you can do is something like:

{% if whatever %} 
      {% cache %} 
         {{ do some output stuff }}
      {%endcache%}
{% endif %}

For more info, check out Straight UP Craft as well as Andrew Welch's great piece on the subject.