Skip to content

RedisOperations.getExpire returns zero for negative timeout values [DATAREDIS-526] #1103

Closed
@spring-projects-issues

Description

@spring-projects-issues

Duobiao Ou opened DATAREDIS-526 and commented

The redis command TTL and PTTL should return negative number(-1 or -2) when the key does not exist or if the key exist but has no associated expire.
But the function getExpire like this: redisTemplate.getExpire(key1, TimeUnit.SECONDS),the return value will be 0 and redisTemplate.getExpire(key1) will be -1 or -2


Referenced from: pull request #205

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions