Coder Social home page Coder Social logo

Comments (9)

forrest79 avatar forrest79 commented on August 21, 2024

Maybe use gc_maxlifetime if cookie_lifetime is 0?

from redis.

fprochazka avatar fprochazka commented on August 21, 2024

I'm open to suggestions! Would be happy to accept a pullrq also :)

from redis.

forrest79 avatar forrest79 commented on August 21, 2024

I will definitely make a pullrq after we decide, how we handle this :-) For example Predis SessionHandler check only gc_maxlifetime or user defined value. For me this make sence. If cookie_lifetime is smaller than gc_maxlifetime, then use cookie_lifetime, if gc_maxlifetime is smaller than cookie_lifetime, then use cookie_lifetime and if cookie_lifetime is 0, then use gc_maxlifetime too. We can have session in redis longer than is neccesary, when user close browser before gc_maxlifetime, but I think, that we could life with it :-)

from redis.

fprochazka avatar fprochazka commented on August 21, 2024

I finally understood what is this issue about :) I should get more sleep more often.
The min() behaviour is implemented here, so I guess we just have to make it smarter to choose the min, but not if one of them is zero?

from redis.

forrest79 avatar forrest79 commented on August 21, 2024

Yes, that is what I am talking about :-) Maybe I am not so good to describe it in english :-) I don't know if gc_maxlifetime can be zero. Because if it can, I don't know what time return for setEx. If it can't I agreed with you to choose the min but not zero.

from redis.

forrest79 avatar forrest79 commented on August 21, 2024

Ok, I have tested it and gc_maxlifetime can be set to 0. I can't image what PHP do when gc_maxlifetime is 0, but we need to deside what to do, if gc_maxlifetime = 0 and also cookie_lifetime = 0. Return Nette deafult gc_maxlifetime (3 hours) or PHP default gc_maxlifetime (1440s)?

from redis.

fprochazka avatar fprochazka commented on August 21, 2024

I would throw an exception if all the resulting time is 0, because that would be just stupid.

from redis.

fprochazka avatar fprochazka commented on August 21, 2024

You can always change that for session in config and the sessionhandler in kdyby/redis should pick that up.

from redis.

fprochazka avatar fprochazka commented on August 21, 2024

Fixed by #52

from redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.