Closed AlexanderLill closed 7 years ago
@sacdallago referring to your comment from the closed issue: i don't know if express does some magic caching on its own but if thats not the case then we don't do caching. What do you think of https://www.npmjs.com/package/apicache ? Shouldnt be too much work to integrate it right?
I assume this will only work for exactly the same requests? If we have two requests coming from two users their latitude/longitude parameters will most likely differ even if the two users are in fact very close. So if we decide to use this we will probably need to truncate the accuracy of the latitude/longitude parameters by a few decimals. Or we use some concept of cells und retrieve the predictions by cell id?
@johartl yes that is true. Currently im not having this much time to implement a super fancy caching thing. If anyone of my project or the other people want to do this then go for it. I would also suggest that once we get to a high number of users an we run into issues one can start optimizing performance (an thus implement an efficient and smart cache).
@jonas-he so, for now, let's got for the not-so-fancy caching variant.
It would definitely make sense to see how much this is actually needed, by looking at how much it takes to generate 10 predictions at the same time..
see #181
Hello everyone,
sorry for bringing this up, but we are currently thinking about how the caching of pokemon predictions can be implemented. We are doing this, because currently the prediction team triggers a new round of predicting every time data is requested:
It would therefore make sense if the API would cache already predicted pokemon for a certain location and time.
We started a discussion here (https://github.com/PokemonGoers/Catch-em-all/issues/93) with @marwage and @bensLine and we came to the result that it would make a lot of sense, if the @PokemonGoers/pokedata team could cache those predictions.
@sacdallago mentioned some possibilities here https://github.com/PokemonGoers/Catch-em-all/issues/93#issuecomment-251894037.
If nobody complains I will close the issue https://github.com/PokemonGoers/Catch-em-all/issues/93 in the @PokemonGoers/catch-em-all group.