muesli / cache2go

Concurrency-safe Go caching library with expiration capabilities and access counters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new cache double check

kimmykuang opened this issue · comments

what are the advantages doing double check table name exists in cache2go.Cache?

See: #11

Essentially: between read-locking and locking, the table might have been created in another thread.

thanks.

@muesli ,I think the RLock() may be not needed because of the double check