Comments (9)
Maybe use gc_maxlifetime if cookie_lifetime is 0?
from redis.
I'm open to suggestions! Would be happy to accept a pullrq also :)
from redis.
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.
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.
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.
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.
I would throw an exception if all the resulting time is 0, because that would be just stupid.
from redis.
You can always change that for session in config and the sessionhandler in kdyby/redis should pick that up.
from redis.
Fixed by #52
from redis.
Related Issues (20)
- PHP 8 Compatibility HOT 2
- Config issue on v6.0.0-rc2 HOT 5
- RedisException: Redis server went away after upgrade to v 6.0.0 HOT 8
- Configuration behaviour on v6.0 HOT 2
- Return type of RedisSessionHandler::gc doesn't match the interface HOT 2
- New release with nette/utils 4.0 support HOT 2
- PHP Warning: Declaration of Kdyby\Redis\Driver\PhpRedisDriver::connect
- Nette\DI\ServiceCreationException Service 'cache.storage' not found in definitions HOT 1
- Sessions are lost between requests HOT 2
- Fatal error: Invalid serialization data * HOT 2
- Question: how to get rid of `Multiple services of type Nette\Caching\Storages\IJournal found` HOT 1
- Setting different db HOT 1
- Support for redis cluster and/or version that's compatible with twemproxy HOT 1
- PHP 7.2 - Cannot use 'Object' as class name as it is reserved HOT 10
- Incompatible declarations of Redis::connect() and Redis::script() HOT 8
- Nette 2 vs. 3 HOT 1
- PHP 7.4 support HOT 2
- Socket connection: type error
- Implementation of Nette/Caching/BulkReader
- keys to scan in RedisJournal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.