fixed cache writing command