/** * Flushes cached assets in the public directory. * * @return void */ public static function flush() { // Remove all the caches for js/css in casset cache folder. $types = array('js', 'css'); foreach ($types as $type) { $files = glob(DOCROOT . 'public' . DS . \Casset::get_cache_path() . '*.' . $type); foreach ($files as $file) { unlink($file); } } \Cli::write('Flushed: cache', 'green'); // Remove all the app's caches in cache folder. \Cache::delete_all(null, 'file'); }
<?php return array('source_dir' => DOCROOT . 'assets/', 'output_dir' => Casset::get_cache_path(), 'casset_path_key' => 'cache');