O'Reilly logo

Mastering ServiceStack by Andreas Niedermair

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sessions

Whenever there's a need to store data that needs the scope of a (browser) session, the ordinary approach is to store data on the server-side, which can be accessed via a session-key that is stored on the client by some mechanism.

Three types of session lifetimes exist within a browser scenario. They are as follows:

  • Temporary sessions: The cookie holding the session key has no explicit expiration timestamp set; hence, it lives only while a browser window is open.
  • Permanent sessions: The session key is stored in a cookie, whose expiration timestamp is set in the far future (ServiceStack uses a lifetime of 20 years from creation as the default).
  • Sliding sessions: The cookie that holds the session key is stored with an expiry in the near future. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required