# SessionRotate()

invalidate current session, creates a new session and migrate the data from the old session to the new.

```
SessionRotate( );
```

**Returns:** void

*This function does not take any arguments.*

# Examples

```cfml
<cfset session.name = "lucee" />
<cfdump var="#session#" label="Before sessionRotate">

<cfset sessionRotate()/>

<cfset session.name = "Susi" />
<cfdump var="#session#" label="After sessionRotate">

```




## Related System Properties / Environment Variables

- [LUCEE_SESSIONCOOKIE_ROTATE_UNKNOWN](../environment-variables-system-properties.md#lucee_sessioncookie_rotate_unknown) - Controls whether unknown CFML session cookies are automatically rotated. When `false`, unknown session cookies will not be rotated
  ***Type:** boolean, **Default:** true*



# Categories

[Session](../../categories/session.md)

# See Also

[SessionCommit()](sessioncommit.md), [SessionExists()](sessionexists.md), [SessionInvalidate()](sessioninvalidate.md), [SessionStartTime()](sessionstarttime.md), [Session Handling in Lucee](../../recipes/session-handling.md), [Application.cfc / <cfapplication>](../tags/application.md)