pyramid_redis_sessions
pyramid_redis_sessions copied to clipboard
redis `set`+`expire` could just be `setex`
setex
does both [http://redis.io/commands/SETEX] in a single call. The performane difference in python is non-existent, but it's much better for the server.
It requires Redis 2.0 -- which was released in 2010.
I'll generate a PR.
(I'm doing tickets and PRs for everything separate so you can pick & choose if there are any issues).
This is now part of the 'consolidated_updates' PR.
I've also done an example against the current just so you can see how it works more clearly - https://github.com/jvanasco/pyramid_redis_sessions/tree/feature-setex
The current minimum-required redis.py supports SETEX.