put back cache but fix js code