kpango / gache

fastest lockfree cache library for go application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SetWithExpire need to check the expire time <=0?

kevindiu opened this issue · comments

Since the data should expire immediately, is it better to check expire <=0 before it is set to the gache?

gache/gache.go

Line 282 in b5c48d4

func SetWithExpire(key string, val interface{}, expire time.Duration) {

we need negative expiration variable for persistent cache