Skip to content

Commit

Permalink
update a comment
Browse files Browse the repository at this point in the history
There was an issue with confusion about this a while ago.
  • Loading branch information
alicebob committed May 27, 2020
1 parent 6fbbe6e commit 34d9a7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ func (db *RedisDB) Unlink(k string) bool {

// TTL is the left over time to live. As set via EXPIRE, PEXPIRE, EXPIREAT,
// PEXPIREAT.
// 0 if not set.
// Note: this direct function returns 0 if there is no TTL set, unlike redis,
// which returns -1.
func (m *Miniredis) TTL(k string) time.Duration {
return m.DB(m.selectedDB).TTL(k)
}
Expand Down

0 comments on commit 34d9a7a

Please sign in to comment.