Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread safe #74

Open
cathoderaymission opened this issue Feb 9, 2017 · 1 comment
Open

Thread safe #74

cathoderaymission opened this issue Feb 9, 2017 · 1 comment

Comments

@cathoderaymission
Copy link

Request to make TMDb3 thread safe.

I think one part requires not using one specific cache file but using a seperate file for each lookup.

Btw, awesome package! Thanks for your work.

@cathoderaymission
Copy link
Author

For anyone else - I've worked around this with an ugly hack.

In addition to using locks for any type of search and on any object which calls a function eg:title.imdb, title.alternative_titles, etc. as these accesses use the built-in cache for reads/writes...

I modified put() and get() in the Cache class to save the data from an url request to a file with the filename being the hash of the url, and conversely to read that file on a get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@cathoderaymission and others