Skip to content

Commit

Permalink
fix(redis): respect both global and operation options for ttl
Browse files Browse the repository at this point in the history
resolves #174
  • Loading branch information
pi0 committed Mar 7, 2023
1 parent 9294121 commit a491333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default defineDriver((opts: RedisOptions = {}) => {
async setItem(key, value, tOptions) {
let ttl = tOptions?.ttl ?? opts.ttl;
if (ttl) {
await getRedisClient().set(p(key), value, "EX", tOptions.ttl);
await getRedisClient().set(p(key), value, "EX", ttl);
} else {
await getRedisClient().set(p(key), value);
}
Expand Down

0 comments on commit a491333

Please sign in to comment.