Start a new topic

Avoid total_pages cache bug when pulling for past data

If I want to pull for historical opens data, I need to hit the reports/opens endpoint for a particular date range.

Right now, there is no way to parallelize this because of the 'total_pages' bug whereby total_pages count is cached for 2 minutes.

Even for making subsequent calls for each day, I need to add a 2-minute delay between dates for which I am calling, and need to add logic into my code to restart pagination in case this total_pages value changes.

I understand that this is pulling from the backend and needs to scan a lot of data, but you could cache this for historical dates once for data that you know is not changing.

Login or Signup to post a comment