Closed JeffreyCA closed 9 years ago
It doesn't do that for BaseRiotAPI though:
BaseRiotAPI.setMirror(Region.NA);
BaseRiotAPI.setRegion(Region.NA);
BaseRiotAPI.setAPIKey("744e79b3-a84f-49c2-aa78-4fab3d9b0401");
Map<String, Summoner> summoners = BaseRiotAPI
.getSummonersByName("TheOddOne");
Summoner summoner = summoners.get("theoddone");
System.out.println(summoner.getId());
BaseRiotAPI.setMirror(Region.LAN);
BaseRiotAPI.setRegion(Region.LAN);
summoners = BaseRiotAPI.getSummonersByName("TheOddOne");
summoner = summoners.get("theoddone");
System.out.println(summoner.getId());
The code above gives me different values, which is the way it should be
Hey - this is a result of the way caching is set up right now. Summoners are automatically cached internally in Orianna, and the cache is currently not separated by region. The existing workaround would probably be to use RiotAPI.setDataStore(new VoidDataStore()) to disable caching.
Alright, thanks
This issue should not be closed until its fixed imo. Just ran into the same problem :(
If I want to process data for a summoner with the same name, but on different regions/servers, it gives me the same data as the account on the first region, as shown below.
It seems
RiotAPI.setMirror(Region.LAN);
andRiotAPI.setRegion(Region.LAN);
are not changing the region?The code above gives me the same output, even though they should be different. This happens for both RiotAPI and AsyncRiotAPI.