Indika, instead of trying to calculate the right expiry time. Our suggestion is to prefix the "key" with the self.online_session.session_id. That will generate a new key with each session.
Answered
Set cache to expire when session ends.
Hello,
Is it possible to set the cache to expire when a session ends or when a user logs out, instead of setting a fixed time?
I'm using self.cache.set("key", "value", "exp time") to set the cache currently. Is there any other way?
Thank you
Indika
113 Views
1
Answer
4 years ago
4 years ago
Tags