Ejemplo n.º 1
0
 /**
  * Clears all parsed template files in the cache folder.
  *
  * Can only be called once per request (there may be multiple SSViewer instances).
  */
 public static function flush_template_cache()
 {
     if (!self::$flushed) {
         $dir = dir(TEMP_FOLDER);
         while (false !== ($file = $dir->read())) {
             if (strstr($file, '.cache')) {
                 unlink(TEMP_FOLDER . '/' . $file);
             }
         }
         self::$flushed = true;
     }
 }