# 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

```1
<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. Removed in 6.2.1.67 as part of session scope refactoring, this setting is no longer used.
  ***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)