(key string, duration int64, tag ...string)
| 102 | } |
| 103 | |
| 104 | func (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 | |
| 114 | func (ek *ExpireStructure) EXPIREBYAT(key string, timestamp int64, tag ...string) error { |
| 115 | if len(tag) == 0 { |