Customize the fields of a Memcached session record ?


I am using Memcached with Xenforo to store my user sessions and everything works fine out of the box. Thanks a lot for that by the way !

I am also using the XF session as an authentication method for other custom-made services, just by retrieving and reading the Memcached record corresponding to the user cookie. It is working fine as well, and I'm able to check if an user is currently logged in, his ID or if he is an administrator.

However, I was wondering if it was possible to customize the data Xenforo registered in the memcached record. For example, the groups the user belongs or any profile information, so I can check that as well without having to do an (expansive) request to my SQL after checking the Memcached if he's logged in.

Is there an easy way to customize the fields Xenforo feeds the Memcached with when it creates/updates an entry ?

Thanks a lot !
The session data is totally free form. Assuming you're using the XF session APIs to access it, you just set any additional named keys you want and they will be accessible.
Top Bottom