View Single Post
Old 04-17-2011, 02:21 PM   #22
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I was already running identify from the download_cover, the bit I missed was properly populating the isbn to identifier cache correctly with the cache_isbn_to_identifier() function. I just did that and now my cache lookups are working.

Is that function taking care of xisbn somewhere? I saw that you're still importing the xisbn function, but it looks like it's being taken care of outside of the plugins now, haven't followed through all the logic.

Won't there will still be a chance that the identify() [and in turn whatever web service] can get called twice with the same parameters for cases where there are no identifier's whatsoever in the initial query? Once to get the metadata, and a second time from inside download_cover(). Since there isn't any ISBN there's nothing to get a successful cache lookup from, and it will wind up going to the service.

I'm wondering if creating a hash on the title/author combo might make sense as a cache lookup key for this kind of case. With the new framework it's not going to be infinitely variable like it was in the old framework when all the title/author combos in isbndb were queried.
ldolse is offline   Reply With Quote