Implement writeCache