Created
March 1, 2013 13:27
-
-
Save anselmdk/5064660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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