sdispater / cachy

Cachy provides a simple yet effective caching library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CacheManager is thread local, which means custom drivers must be re-registered in each new thread

marco-c opened this issue · comments

I wonder if there isn't a better way to keep thread-safety without making users re-register their custom drivers.

One possibly way could be to register drivers externally (as a static? Not sure what happens to static members in classes extending threading.local) from CacheManager, so that a new instance of CacheManager doesn't lose them.