Country players endpoint enhancement request (cache time)

Sort:
skelos

Hi,

https://www.chess.com/news/view/published-data-api#pubapi-endpoint-country-players

 

This is very clear that the cache is updated at most once per day. Indeed, for AU, I appear to trigger an update with a request >24 hours after my previous request. I strongly suspect I'm the only one using this endpoint for AU right now. (As I'm the "supplier of data" to people recruiting for Team Australia and city/state teams that's perhaps not surprising.)

What is a mild nuisance is that my request must be made >24 hours after my previous one, or I don't trigger an update.

If the maximum cache time were reduced to perhaps 23 hours (or even 23 hours 55 minutes) an automated job won't be chancing getting the old data at the end of the 24 hour cache period (already processed, presumably) and not getting new data until the day following. Plus some active users who are not online every day could slip through for a while if effectively new data is only seen every 48 hours.

I hope:

a) This makes sense (it's hard to explain clearly tear.png)

b) That reducing the cache to a bit below 24 hours is OK.

 

Clearly for any country that is accessed my multiple people regularly there's no chance of unfortunate synchronisation, but for countries being accessed by one person it's a definite possibility.

What I'd really like as my processing of the data is somewhat manual would be for the cache time to be dropped to 12 hours. Then I could do a day's run whenever I was ready as long as it was approximately a day after my previous run, and I'd get good (new) data.

Wind

Yea the cache makes the process seem a bit limited and tiring.
I get what you mean.
In the members search it takes too long to reset latest activity.
It is somewhat annoying.

Wind

It should reset in a speed similar to the daily invites basis.

bcurtis

@skelos — I had thought that we did that, actually, but it looks like I forgot to follow-through with the plan. We have not seen any problems with this endpoint, so I think the caching of the data can be eased up a lot. We'll adjust it this week.

skelos

Thanks. I've worked out how to automate all but the hopelessly manual parts of the job I run, and they can be put up on a website for someone else to do the work. happy.png

Members put the most amazing things in their locality information. Often it's valid, but even for Australia I'm hitting a web search to figure which state some of the real places are located in.

Now to do today's effort, since I am reminded. Or yesterday's, as it's past midnight.

andreamorandini

@skelos we adjusted the cache "a bit below" 24 hours for all endpoints and "a bit below" 12 hours  for Country's players and Club's members.

skelos

Thanks! Much appreciated. That gives me a lot more flexibility for manual use of those endpoints, and "a bit below" means a regularly scheduled job (I anticipate a once-a-day effort for AU, which I've been doing manually to date) will work just fine.

BTW I can confirm I've seen a country players' endpoint update under 24 hours.