pyramid_redis_sessions icon indicating copy to clipboard operation
pyramid_redis_sessions copied to clipboard

redis `set`+`expire` could just be `setex`

Open jvanasco opened this issue 9 years ago • 1 comments

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).

jvanasco avatar Nov 14 '15 18:11 jvanasco

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.

jvanasco avatar Nov 15 '15 22:11 jvanasco