Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis set+expire could just be setex #67

Open
jvanasco opened this issue Nov 14, 2015 · 1 comment
Open

redis set+expire could just be setex #67

jvanasco opened this issue Nov 14, 2015 · 1 comment

Comments

@jvanasco
Copy link
Contributor

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant