nrelay icon indicating copy to clipboard operation
nrelay copied to clipboard

Make char-info.cache usage optional

Open RedKage opened this issue 4 years ago • 1 comments

Hello,

The file char-info.cache.json is used everytime account-service.getCharacterInfo() is executed. This make the actual API call to /char/list to not occur when the cache exists.

This can be an issue: to load properly the daily reward calendar (at /dailyLogin/fetchCalendar, we need to first hit /char/list or else the calendar XML is not refreshed.

Feature request: Adding a command line switch to disable the use and creation of char-info.cache.json. Something like --disable-char-info-cache

In my use case, for each account, this would really hit the /char/list endpoint and then I would get an updated daily reward XML on the /dailyLogin/fetchCalendar endpoint.

Right now, what I'll do is rm the file before launching nrelay. And that's not super cool :D

RedKage avatar May 05 '20 11:05 RedKage

I think this is a cool idea. This should also provide a good way for people to circumvent occasional problems with the char list cache without having to delete the cache. Since the server list is also fetched from the same endpoint, it probably makes more sense to just have a general --no-cache flag.

thomas-crane avatar May 06 '20 02:05 thomas-crane