muesli / cache2go

Concurrency-safe Go caching library with expiration capabilities and access counters
Other
2.11k stars 518 forks source link

addInternal() call expirationCheck() is not a good idea #54

Open KR-Yuan opened 3 years ago

KR-Yuan commented 3 years ago

when create a cachetable to init expirationCheck() function , maybe better than call it in addInternal function

JasonDevops commented 3 years ago

yes,I know that you question was right,Last night I was trying to run the projects,When I tested expirationCheck() function, But I found that it has bugs,When accessedOn is almost greater now time(time := time.Now()),So that expirationCheck() function can't callback these cache which was expired.