Replies: 1 comment 5 replies
-
Currently this is not possible. Destroying a session marks it as destroyed. Later the session is removed (at the end of the request). However, at this point your insert is not possible since the session no longer exists and a new session won't be created until the next request. This life cycle is somewhat fundamental to our design and even more broadly to sessions as a concept. Generally, you can't destroy a session through a reference and then expect that same reference to point to a new session. So instead of this, what I think would be a better fit for this model is to |
Beta Was this translation helpful? Give feedback.
-
Hi, I tried calling
session.destroy()
in my route handler and thensession.insert()
because I want this particular route handler to be able to start with a clean slate whenever it is called. I found that theinsert
call failed. Is it possible todestroy()
theninsert()
in the same handler one line after the other?Beta Was this translation helpful? Give feedback.
All reactions