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

Method PEXPIREBY

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

Source from the content-addressed store, hash-verified

102}
103
104func (ek *ExpireStructure) PEXPIREBY(key string, duration int64, tag ...string) error {
105 if len(tag) == 0 {
106 return ek.setExpireToDB(key, duration)
107 } else if len(tag) == 1 && tag[0] == "ex" {
108 return ek.setExpireToDB(key, ek.getCurrentMiliUnixTimeStamp()+duration)
109 } else {
110 return ErrInvalidArgs
111 }
112}
113
114func (ek *ExpireStructure) EXPIREBYAT(key string, timestamp int64, tag ...string) error {
115 if len(tag) == 0 {

Callers 1

Calls 2

setExpireToDBMethod · 0.95

Tested by 1