Skip to content

Stats v4 API: stale data issue workaround #1183

@jaclync

Description

@jaclync

As of writing, the revenue stats data from v4 API are cached for an uncertain amount of time if all the parameters are the same. To get around this issue on the client side, we can set a random value to the per_page param that is originally used for the maximum number of intervals (but not needed if after and before params are set correctly).

There is a chance, that the random number stays the same, but the probability should be low when the random param is the same for multiple times. If this proves to be an issue, we could update to a more robust approach like remembering the last random param value and incrementing each time. For now, let's use a simple approach and hopefully this issue will be fixed soon.

Thanks to Android for this workaround!

Metadata

Metadata

Assignees

Labels

feature: statsRelated to stats, including Top Performers.needs: api supportWaiting for an API change before it can move forward.needs: api support v4Waiting for an API change in v4 before it can move forward.type: taskAn internally driven task.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions