(key string, duration int64, tag ...string)
| 92 | } |
| 93 | |
| 94 | func (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 | |
| 104 | func (ek *ExpireStructure) PEXPIREBY(key string, duration int64, tag ...string) error { |
| 105 | if len(tag) == 0 { |