Closed droyad closed 3 years ago
@droyad It was not a trivial problem. Thank you for your investigation! I added a separate internal property for configuring the max-age for http cache. By default it is twice shorter than the link expiration time. Please see https://github.com/JetBrains/teamcity-azure-storage/commit/092e8645666620329a15a406cebde0d95f9159df
Unfortunately, this issue is still occurring :(
@IlyaFomenko I think there is a still a problem as the myLinksCache
still hangs onto the URL for the exact time it is valid for. I've created a new PR #15 with a suggested fix.
The myLinksCache expires items after urlLifeTime. The Azure URLs are generated using that exact same duration. The default is 60 seconds.
The overall process is:
The time between step 1 and 3, and step 6 and 7 is non-zero. Therefore the cache can return a link that is almost expired or has expired very recently.
My suggestion is that the url expiry is twice that of the cache time. A cache time of 60 seconds seems reasonable.