Open hackel opened 8 years ago
I've noticed that too. If changing from hset()
to setex()
is not good, one could still set a TTL in the hash.
Any comments on this? I just turned this on in our staging environment and suddenly our Redis cache got pretty filled up.
I originally reported this in barryvdh/laravel-debugbar#417 but I see that the problem is actually in php-debugbar. Storage data is being stored in a single key as a Redis hash (HSET), with each session as an individual field. I think it makes much more sense to store each session as a separate key with a timeout, the way the Laravel session driver works. Basically, instead of
in \DebugBar\Storage\RedisStorage::save, use:
(Along with changing the other respective methods.) Thoughts? I'm happy to do a PR if you think this is a good idea.