(or equal to) the number of seconds specified by B<CacheTimeout>.
That check happens on new values arriwal. If some RRD-file is not updated
anymore for some reason (the computer was shut down, the network is broken,
-etc.) some values may still be in the cache. If B<CacheFlush> is set, then the
-entire cache is searched for entries older than B<CacheTimeout> seconds and
-written to disk every I<Seconds> seconds. Since this is kind of expensive and
-does nothing under normal circumstances, this value should not be too small.
-900 seconds might be a good value, though setting this to 7200 seconds doesn't
-normally do much harm either.
+etc.) some values may still be in the cache. If B<CacheFlush> is set, then
+every I<Seconds> seconds the entire cache is searched for entries older than
+B<CacheTimeout> + B<RandomTimeout> seconds. The entries found are written to
+disk. Since entire cache scan is kind of expensive and does nothing under normal
+circumstances, this value should not be too small. 900 seconds might be a good
+value, though setting this to 7200 seconds doesn't normally do much harm either.
Default value for this option is 10x of B<CacheTimeout>.
If value of B<CacheFlush> less than value of B<CacheTimeout> then default value
if ((cache_timeout > 0) &&
((cdtime() - cache_flush_last) > cache_flush_timeout))
- rrd_cache_flush(cache_timeout);
+ rrd_cache_flush(cache_timeout + random_timeout);
pthread_mutex_unlock(&cache_lock);