SOBotics / apicache

Caches SE API responses to save on requests
8 stars 2 forks source link

Respect backoffs #3

Open ArtOfCode- opened 7 years ago

ArtOfCode- commented 7 years ago

We could do with respecting backoffs. That's not as simple as it sounds, because we only need to respect backoffs if a request returns a backoff and the subsequent request uses the same key. Since we use whatever key happens to be passed in a request that requires an API hit, that's not always the case.

j-f1 commented 7 years ago

@ArtOfCode- Can’t you cache the backoff expiry, then wait until the specified time if the key is present?

ArtOfCode- commented 7 years ago

Yes, but we only need to do that if the same key is used.