Skip to content

Instantly share code, notes, and snippets.

@anselmdk
Created March 1, 2013 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anselmdk/5064660 to your computer and use it in GitHub Desktop.
Save anselmdk/5064660 to your computer and use it in GitHub Desktop.
<?php
/**
* EmptyCacheTask
* See also https://github.com/markguinn/sstools/blob/master/code/SSTasks.php for more like this
*
*
* @author Anselm Christophersen <ac@title.dk>
* @package titlelibs
* @subpackage tasks
*/
class EmptyCacheTask extends BuildTask {
protected $title = "EmptyCacheTask";
protected $description = "
Empties the partial cache
";
function run($request){
if(glob(TEMP_FOLDER.'/cache/zend_cache*')){
foreach (glob(TEMP_FOLDER.'/cache/zend_cache*') as $f){
unlink($f);
}
echo "<br />Partial caching cache has been emptied.";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment