Skip to main content

EXPIRETIME

Syntax

EXPIRETIME key

Module

generic

categories

fast keyspace read

Description

Returns the absolute unix time in seconds when the key will expire.

Examples

Get the expiration time of a key:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
expireTime, err := db.ExpireTime("key")