cache working for http and https