Fix resourcecontroller cache returning html