restructuring and clearing cache