EXPIRETIME
Syntax
EXPIRETIME key
Module
genericcategories
fast keyspace readDescription
Returns the absolute unix time in seconds when the key will expire.
Examples
- Go (Embedded)
- CLI
Get the expiration time of a key:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
expireTime, err := db.ExpireTime("key")
Get the expiration time of a key:
> EXPIRETIME key