cachecontrol icon indicating copy to clipboard operation
cachecontrol copied to clipboard

Document BaseCache expires value

Open thenewguy opened this issue 4 years ago • 1 comments

It would be helpful if the value for expires in BaseCache.set was documented. I couldn't find it and the redis/file caches aren't explicit.

Is the expires value guaranteed to be in UTC?

Related #250

thenewguy avatar Jul 08 '21 14:07 thenewguy

As the date is typically provided by the server, we parse the timezone in order to try to make sure we're making the appropriate comparisons. I can imagine it could be better to convert to UTC, but I can also imagine there could be dragons there too.

In any case, if you look at the code and find a better answer that could use more docs and/or a change in behavior to use UTC, it seems like a legit change.

ionrock avatar Jul 08 '21 15:07 ionrock