nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 307 forks source link

TTL #106

Closed ciroiriarte closed 9 years ago

ciroiriarte commented 9 years ago

Hi!, is it possible to define an expiration time for a whole redis sets or for each SET operation?

nicolasff commented 9 years ago

Hi,

This is really a Redis question, you will get more help on Stack Overflow or the Redis discussion group since Webdis doesn't validate commands and just passes them along to Redis. That said, I don't see it as an option in the Redis docs for SET and MSET.

You can probably do it with MULTI/EXEC but unfortunately Webdis doesn't support this command. Maybe with Lua instead?

ciroiriarte commented 9 years ago

Well, found a command to do a SET+EXPIRE atomic: SETEX

Thanks!