HaJaeKyung / KittyExtension

Fan add-on for https://www.cryptokitties.co
MIT License
232 stars 88 forks source link

How to tell if cached data is working? #34

Open jgoggan opened 6 years ago

jgoggan commented 6 years ago

I'm running the latest (v0.31) and it looks to me like it isn't caching data for some kitties? Like, I go to My Kitties and see 12 cats there. I run my mouse across all 12 and they show the little bouncing cat in the corner -- that means it is waiting for data, right?

So, it loads all of them eventually. Then I go somewhere else and come back to the My Kitties page -- and do the same thing: run my mouse across all 12. I get instant data on maybe 2 of them -- and then the bouncing kitty waiting-to-load-data on the other 10 -- and they eventually fill in.

I can repeated that over and over again. It has instant/cached data for a couple of them -- but not for most of them. It doesn't appear to be storing it?

I just don't want a release to suddenly be a huge load on the server. Once this started caching data, it really helped.

HaJaeKyung commented 6 years ago

I have disabled the caching because you need to do a new request to get up to date info on the virginity and the resting/bun in the oven times. I have added a delay when multiple simultaneous requests to prevent going over the rate limit that is put in place by the site.

In a new version, I will re-add the caching and only request if they are resting/bun in oven/have the possibility to be a virgin.

The net gain of requests is still even because it is no longer making a request for price info.

jgoggan commented 6 years ago

Ok. Personally, I'm not convinced that Virginity and Pregnancy data is worth the extra calls every time.

Do you plan to cache that too -- maybe have a time limit where you don't check it again for X minutes or something?

HaJaeKyung commented 6 years ago

It shouldn't be the responsibility of the 3rd party app to be too concerned of these matters. The devs can instill any rate limit they want and they are making a significant financial gain that should allow them to afford better servers.