removed double cache writing