Closed tsilva closed 8 years ago
@tsilva you just need to mark the session as dirty, the rest will just work. Do self.session.mark()
and see if the session is not extended...
you can now extend session by using explicitly self.session.mark(extend = True)
or by setting any value in the session
Closing this ticket as support now exists for extending session
Description
There seems to be no friendly way of extending an Appier session. In some contexts, it's desirable to be able to extend the session indefinitely.
Solution
The expiration date is being set when the session object is being created. This date can be changed only by accessing the internal property directly. Probably there should be an
refresh()
method to easily refresh the session's expiration date (current date + default timeout).Also, in
RedisSession
values are being stored withSETEX
, therefore they are deleted by Redis when the timeout is reached. To extend the session inRedisSession
, the value's expiration date must be extended using theEXPIRE
command to provide a new timeout.