(memExp int32)
| 38 | } |
| 39 | |
| 40 | func convertMemcacheExpToUnix(memExp int32) int64 { |
| 41 | exp := int64(memExp) |
| 42 | if memExp == 0 { |
| 43 | return 0 |
| 44 | } else if exp < secondMax { |
| 45 | return time.Now().Add(time.Duration(exp) * time.Second).Unix() |
| 46 | } |
| 47 | |
| 48 | return exp |
| 49 | } |
| 50 | |
| 51 | type setHandler struct { |
| 52 | n *Node |