diff --git a/developer_manual/basics/controllers.rst b/developer_manual/basics/controllers.rst index 2ecac4916..6f65f3b40 100644 --- a/developer_manual/basics/controllers.rst +++ b/developer_manual/basics/controllers.rst @@ -222,7 +222,7 @@ To set, get or modify session variables, the ISession object has to be injected Nextcloud will read existing session data at the beginning of the request lifecycle and close the session afterwards. This means that in order to write to the session, the session has to be opened first. This is done implicitly when calling the set method, but would close immidiately afterwards. To prevent this, the session has to be explicitly opened by calling the reopen method. -Alternatively you can use the UseSession annotation to automatically open and close the session for you. +Alternatively you can use the ``@UseSession`` annotation to automatically open and close the session for you. In case the session may be read and written by concurrent requests of your application, keeping the session open during your controller method execution may be required to ensure that the session is locked and no other request can write to the session at the same time. When reopening the session, the session data will also get updated with the latest changes from other requests. Using the annotation will keep the session lock for the whole duration of the controller method execution.