Cakephp Function Help

The below function clears the cakephp cache folder. After the function below I need to pause for 10 seconds to allow time for the files to recreate then chmod the files in this folder back to 777. How can I add this code to the below function to do this

Folder is /tmp/cache

function clearCache() {
if (!empty($this->data[‘Auction’][‘id’])) {
Cache::delete(‘auction_view_’ . $this->data[‘Auction’][‘id’]);
Cache::delete(‘auction_’ . $this->data[‘Auction’][‘id’]);
Cache::delete(‘daemons_extend_auctions’);
Cache::delete(‘last_bid_’ . $this->data[‘Auction’][‘id’]);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *