MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / EXPIREBY

Method EXPIREBY

structure/expiring_key.go:94–102  ·  view source on GitHub ↗
(key string, duration int64, tag ...string)

Source from the content-addressed store, hash-verified

92}
93
94func (ek *ExpireStructure) EXPIREBY(key string, duration int64, tag ...string) error {
95 if len(tag) == 0 {
96 return ek.setExpireToDB(key, duration*1000)
97 } else if len(tag) == 1 && tag[0] == "ex" {
98 return ek.setExpireToDB(key, ek.getCurrentMiliUnixTimeStamp()+duration*1000)
99 } else {
100 return ErrInvalidArgs
101 }
102}
103
104func (ek *ExpireStructure) PEXPIREBY(key string, duration int64, tag ...string) error {
105 if len(tag) == 0 {

Callers 1

Calls 2

setExpireToDBMethod · 0.95

Tested by 1