Skip Menu |

This queue is for tickets about the CHI-Driver-Redis CPAN distribution.

Report information
The Basics
Id: 98006
Status: open
Priority: 0/
Queue: CHI-Driver-Redis

People
Owner: Nobody in particular
Requestors: SKAUFMAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: use setex instead of set optionally
hiya, looking at https://github.com/rentrak/chi-driver-redis/blob/6efc4c57accf38ae4642171bc30ff6e80458b83b/lib/CHI/Driver/Redis.pm#L136 You could replace ->set with ->setex if an expiry is set. I'd have a config param for that option ( default false ) because that feature was introduced in redis as some point. I can work on a patch and PR in github, just wanted to get your thought before proceeding. Thanks! -Sam
Go ahead and put in pull request. I'm not sure about a config option. Maybe have it depend on the Redis server version (checking for each request would be expensive though)? SETEX was introduced in Redis 2.0 so might be acceptable to assume that everyone is running a new enough Redis server. On Wed Aug 13 17:41:08 2014, SKAUFMAN wrote: Show quoted text
> hiya, looking at > https://github.com/rentrak/chi-driver- > redis/blob/6efc4c57accf38ae4642171bc30ff6e80458b83b/lib/CHI/Driver/Redis.pm#L136 > You could replace ->set with ->setex if an expiry is set. I'd have a > config param for that option ( default false ) because that feature > was introduced in redis as some point. I can work on a patch and PR in > github, just wanted to get your thought before proceeding. > Thanks! > -Sam