Do not create a cache if the content-type is not html

This is to fix issues with my Croppa package where dynamically created images were being cached