Alternative session backends?

35 views
Skip to first unread message

uday bhaskar

unread,
Sep 20, 2016, 2:17:36 AM9/20/16
to Play Framework
Is there any file-backed sessions available with play? I need to store more data (big list of strings) in the session due to some complicated authorization in our application. Cache is not a good choice for our use case.

Greg Methvin

unread,
Sep 20, 2016, 2:25:25 AM9/20/16
to Play Framework
The session isn't intended to store large amounts of data. Generally you only want to store a session ID in the Play session and look up that session ID elsewhere. You could write your own session store using the filesystem, or use an actual database to store the session data, and just look up the session by the ID stored in the cookie.

Greg

uday bhaskar

unread,
Sep 20, 2016, 5:24:26 AM9/20/16
to Play Framework
Thanks for the quick reply.  I have never used cookie-based sessions before for this reason.  Our application is not currently using any DB, instead talking to another REST API.  I am new to Scala so, looking for a solution for file-backed session.  Maybe, it is time to write one on my own.  Thanks again.

-Uday
Reply all
Reply to author
Forward
0 new messages