MCPcopy Create free account
hub / github.com/dadgar/onecache / convertMemcacheExpToUnix

Function convertMemcacheExpToUnix

onecache/memcache_handlers.go:40–49  ·  view source on GitHub ↗
(memExp int32)

Source from the content-addressed store, hash-verified

38}
39
40func 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
51type setHandler struct {
52 n *Node

Callers 5

parseMethod · 0.85
parseMethod · 0.85
parseMethod · 0.85
parseMethod · 0.85
parseMethod · 0.85

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected