wagnerrp / pytmdb3

Python interface to TheMovieDB.org v3 API
BSD 3-Clause "New" or "Revised" License
122 stars 36 forks source link

caching problems #4

Closed accident12123 closed 12 years ago

accident12123 commented 12 years ago

now that the caching is configurable, it works great for the first nothing in cache but the second hit (even if it's the same title) errors. this is with and without using the cache configuration..

I also couldn't easily configure the cache until I added it to the import in tmdb_api.py mimicing how you were using set_api

I apologize for not having the exact errors, I forgot to post this before leaving the house.

wagnerrp commented 12 years ago

Fixed, thanks. I missed a name change in a variable when re-organizing things. I didn't notice the problem last night as it does not trigger until an entry in the cache exceeds its expiration (one hour) and gets flushed out.

wagnerrp commented 12 years ago

Also note that 'set_cache()' is included in the methods and functions exposed by init.py, and would be available if you import the installed 'tmdb3' module as a whole, rather than the 'tmdb_api' module directly.

accident12123 commented 12 years ago

Good to know, I was following the example of the mythtv script for how it included things and used it.

wagnerrp commented 12 years ago

I guess it would be a good idea to write up a proper HOWTO for using this thing then... :)