public function purgeScriptCache()
	{
		// assets/js and assets/css
		foreach (array('assets/js', 'assets/css') as $dir)
		{
			// Purge the folder
			$objFolder = new Folder($dir);
			$objFolder->purge();
		}

		// Recreate the internal style sheets
		$this->import(StyleSheets::class, 'StyleSheets');
		$this->StyleSheets->updateStyleSheets();

		// Also empty the page cache so there are no links to deleted scripts
		$this->purgePageCache();

		// Add a log entry
		$this->log('Purged the script cache', __METHOD__, TL_CRON);
	}
public function purgeScriptCache()
	{
		// assets/js and assets/css
		foreach (array('assets/js', 'assets/css') as $dir)
		{
			// Purge the folder
			$objFolder = new Folder($dir);
			$objFolder->purge();
		}

		// Recreate the internal style sheets
		$this->import(StyleSheets::class, 'StyleSheets');
		$this->StyleSheets->updateStyleSheets();

		// Also empty the page cache so there are no links to deleted scripts
		$this->purgePageCache();

		// Add a log entry
		$this->log('Purged the script cache', __METHOD__, TL_CRON);
	}
public function purgeScriptCache ( ) { // assets/js and assets/css foreach ( array ( 'assets/js' , 'assets/css' ) as $ dir ) { // Purge the folder $ objFolder = new Folder ( $ dir ) ; $ objFolder -> purge ( ) ; } // Recreate the internal style sheets $ this -> import ( StyleSheets :: class , 'StyleSheets' ) ; $ this -> StyleSheets -> updateStyleSheets ( ) ; // Also empty the page cache so there are no links to deleted scripts $ this -> purgePageCache ( ) ; // Add a log entry $ this -> log ( 'Purged the script cache' , __METHOD__ , TL_CRON ) ; }
Purge the script cache
Purge the script cache