Files
gerrit/Documentation
Patrick Hiesel d70f37fc45 Replace ProjectCacheClock with refreshAfterWrite
This commit replaces a home-grown piece of infrastructure with
a standard component that has the same behavior.

ProjectCacheClock was used to detect values in ProjectCache that
are old enough that they might be out of date. It would then
schedule a task on a background thread to check the value.

Both Guava Caches and Caffeine Caches offer this as standard
functionality: refreshAfterWrite.

This is even better than what we had with ProjectCacheClock
because it does the actual refreshing (= reloading the value)
on the background thread.

In a prior commit, we have implemented this option in our own
Cache config framework and the H2 persistent store.

This commit makes use of that prework in the ProjectCache. We
set the default refreshAfterWrite to 15 minutes and the
expireAfterWrite - the duration after which a value is not
read anymore - to 1 hour. Both are configurable. It is also
possible to disable this behavior entirely.

Similar to ProjectCacheClock, we use a dedicated executor for
refreshing cached values. The executor is generic and not
specific to ProjectCache. It's size is configurable.

Change-Id: I8b163853ae092444edf9ff44bef4f7910f21ba0e
2020-05-27 08:51:37 +02:00
..
2015-05-06 11:25:51 -07:00
2020-05-13 16:46:01 +02:00
2018-09-24 23:07:53 +00:00
2018-09-27 16:45:10 +09:00
2020-03-02 08:12:22 +09:00
2020-05-17 09:14:10 +09:00
2020-04-02 14:18:24 +00:00
2020-04-03 10:12:08 +09:00
2020-02-12 09:09:16 +09:00
2020-05-14 14:04:07 +02:00
2020-04-03 10:12:08 +09:00
2020-01-10 14:20:23 +09:00
2020-02-13 10:25:58 +09:00
2018-09-12 13:27:01 +09:00
2020-05-17 09:14:10 +09:00
2017-09-30 15:47:14 +02:00
2015-04-30 14:37:09 +00:00
2020-04-04 10:09:39 -04:00