rfink / sequelize-redis-cache

Small fluent interface for caching sequelize database query results in redis more easily
MIT License
174 stars 47 forks source link

Removed setex and use default set and EX option because setex is depr… #16

Closed thujikun closed 8 years ago

thujikun commented 8 years ago

…ecated.

thujikun commented 8 years ago

Amazon ElastiCache redis haven't support 'setex' yet. So I updated to use default 'set' method and 'EX' option instead. Moreover I added fineOne method support for cache because it's included in sequelize.

rfink commented 8 years ago

Hello and thanks very much for contributing! I'm also using Amazon ElastiCache, but I haven't encountered an issue with setex. What engine version are you on?

thujikun commented 8 years ago

Sorry for late reply. My ElastiCache redis version is 2.8.19.

roccomuso commented 8 years ago

+1 replace the .setex deprecated method with .set.

rfink commented 8 years ago

Do either of you have a link to the deprecation notice? This is the first I'm hearing of it.

roccomuso commented 8 years ago

@rfink the method is not reported on the node_redis documentation.

thujikun commented 8 years ago

Here. http://redis.io/commands/SET

Note: Since the SET command options can replace SETNX, SETEX, PSETEX, it is possible that in future versions of Redis these three commands will be deprecated and finally removed.

rfink commented 8 years ago

Thanks. Did not know that was a possibility. I'll take a look at this PR and get it merged in, hopefully today. Thanks again.

rfink commented 8 years ago

This is merged and released in 1.4.0. Thanks! Glad to find out about the deprecation before it happened.

thujikun commented 8 years ago

Thanks! I confirmed it!