Hi everyone. I’m trying to build my own `SessionSt...
# ktor
i
Hi everyone. I’m trying to build my own
SessionStorage
to persist my sessions to a postgres db. The one thing that I have noticed, is that it seems the
write()
function of the
SessionStorage
seems to be called at the end of every one of my authenticated requests. For each authenticated request, it seems that a session read is triggered, followed by my session authorisation, followed by a session write. Is this expected behaviour? My initial assumption was that the
write()
function would only be called when the session is set on for example user login. What is the reason for triggering a session write at the end of every request?