Cache HTTP and HTTPS seperately using {% cache %}
Something like this would work:

{% if craft.request.isSecure() %}
    {% set cacheKey = 'secure' %}
{% else %}
    {% set cacheKey = 'insecure' %}
{% endif %}

{% cache using key cacheKey %}
    ...
{% endcache %}


See here for more info.