Open Benzeliden opened 1 week ago
Thanks for the report, i'm going to investiage it. content.Age
should be a problem, it only contains the value sent from an intermediary (the content might sent by a proxy, where it's already aged). So it's part of the calculation, but the client doesn't update it, it uses the time difference between the current time and when the response (content) received.
I think if (content.ResponseTime > content.RequestTime)
should be if (content.ResponseTime <= content.RequestTime)
.
Plugin version 3.0.11 Unity version 2021.3.37f
Hello,
I'm experimenting with caching using my dev server and apparently it looks like there is an issue with age of cache. At lease this is what I'm observing in UnityEditor:
My game does requests to
my-game-server/news
endpointExample headers received from server (that are stored in headers.cache file)
Then I stop the game and restart it 5 minutes later - and I still see old content returned by response.
If I use postman to check the same endoint - I can clearly see content changed.
==============================================
After looking into source code I come into
CanServeWithoutValidation
method (Hope it's okay if I share some fragments of it)So as I undestand my issue is that content.Age = 0 and there is no code that will recalculate current_age
I put this
else
block as a quick fix:with this it looks fine
but I'm hoping for a more proper solution to this issue