Fixed cache writing permissions problem