Example #1
0
 /**
  * persists the config-data and truncates the file-cache.
  */
 public static function save()
 {
     // save cache only if changes happened
     if (!self::$changed) {
         return;
     }
     // after all no data needs to be deleted or update, so skip save
     if (empty(self::$deletedData) && empty(self::$changedData)) {
         return;
     }
     // delete cache-file; will be regenerated on next request
     rex_file::delete(REX_CONFIG_FILE_CACHE);
     // save all data to the db
     self::saveToDb();
     self::$changed = false;
 }