ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.

Home Page:http://sabintsev.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS request cache - question

bbialas opened this issue · comments

I just encountered a problem, that my app was released to the App Store, the update was already visible in the App Store, but the request to https://itunes.apple.com/lookup?bundleId=XXX&country=XXX was still returning previous app version information.

After checking the server response, I realized that one of the response headers shows that the response is cached on the Apple server and that's the reason.

X-Cache: TCP_MEM_HIT from a104-85-249-20.deploy.akamaitechnologies.com (AkamaiGHost/11.1.3-49328623) (-)
Cache-Control: max-age=12989

Why not to implement a cache-busting solution into this plugin, to always get the latest result from the Apple server?

It could be done like:
https://itunes.apple.com/lookup?bundleId=XXX&country=XXX**&t=<current_timestamp>**

What do you think?

PS.
When I tested it with this solution, I got a good response with the latest app version data.
I never had this issue before, and I wonder, if this caching is maybe something new introduced by Apple on their servers...

Hi - feel free to open a PR

Any solution for this? same is happening for me. The app was released 2 days ago and it is still returning the older version.

Hi, as mentioned above, I need a PR open to review this. I don't actively do iOS development anymore.

Hello,
I created a PR, please take a look.

#415

Thank you.