Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MapObject cache #205

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

Closed
ramarro123 opened this issue Jul 25, 2016 · 5 comments
Closed

MapObject cache #205

ramarro123 opened this issue Jul 25, 2016 · 5 comments

Comments

@ramarro123
Copy link
Contributor

Hi,

after reading the code, i would like to know how and if caching work now.
getMapObject put some data on cacheObj, but this data are never returned, and on getMapObject
the API get always called.

if i do a getPokestop & getCatchablepoke on the same function, the api get called twice.

mapObjectsExpiry by default it's not set by default, but setting it won't help standing from code.

it's currently caching disabled?

@Aphoh
Copy link
Collaborator

Aphoh commented Jul 25, 2016

@Grover-c13 did you design this? maybe you can speak a little towards it?

@Grover-c13
Copy link
Owner

it was redesigned by someone, cant remember who. Basically from what i understand you can force a fresh copy from the server by setting the parameter to true

@Grover-c13
Copy link
Owner

looks like it may have issues, will look into it on weekend.

@ramarro123
Copy link
Contributor Author

@Grover-c13 for what i have see, there are multiple problems

  1. the cache object it's not returned (so the cache it's not working)
  2. if the cache object it's returned, the object on it won't update after 'user' action ie:
    -- i catch a pokemon, it should disappear from list of catchable (it should disappear after the encounter i think)
    -- i loot a fort, he should have looted expires
    -- pokestop should be invariant objects? using their ids has hashcode to update them?

@Grover-c13
Copy link
Owner

Ive reworked the cache in the PR #386, people wont have a choice anymore and must use the retained object for at least 5 seconds (this is part of the server throttling), the next request after 5 seconds will always be a fresh request and always sends 0 as the timestamp (the game doesnt seem to send last update just 0).

I agree we need to remove them from the list if caught, makes sense will look at it some time.

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

No branches or pull requests

4 participants