github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/utils/cache/ttl.go (about)

     1  package cache
     2  
     3  import "time"
     4  
     5  func Seconds(ttl int) time.Time {
     6  	return time.Now().Add(time.Duration(ttl) * time.Second)
     7  }
     8  
     9  func Days(ttl int) time.Time {
    10  	return time.Now().Add(time.Duration(ttl) * time.Second * 60 * 60 * 24)
    11  }