appmattus / certificatetransparency

Certificate transparency for Android and JVM
Apache License 2.0
142 stars 29 forks source link

Cache refresh mechanism question #98

Open sudojhill opened 1 year ago

sudojhill commented 1 year ago

I've noticed that the json timestamp field is used to determine when the cache needs to be refreshed. I am wondering if there was a reason why a "last successful download" timestamp wasn't used? Take for example the case where the log list is not updated by google for more than a day. Since the timestamp field is more than a day old, the cache is never used and every network request now queries for the log list hosted by google until the log list file is finally updated by them.

If a "last successful download" timestamp was used instead, then we would use the local cache for a day, and download the url hosted log file once a day.

I've looked into this behaviour as part of #97 because I was in this exact scenario where my log list mirror became out of date for more than a day. The large number of queries that started being triggered for the url hosted log list triggered the issue described in #97.