$session->save( $filename [, $class ] );

The save() function saves the repository in the specified file. If a class name is specified, then only the instances of that class are saved.