proxy cache server done. few null checks included