question: @ Scheduled ( fixedDelay = 1000 ) private void checkCache ( ) { if ( lastCacheTime == null ) { return ; } long tEnd = System . currentTimeMillis ( ) ; long tDelta = tEnd - lastCacheTime ; double elapsedSeconds = tDelta / 1000.0 ; if ( elapsedSeconds > 1.0 && ! caching . isEmpty ( ) ) { logger . debug ( "flush log cache by timeout " + elapsedSeconds ) ; flushCache ( ) ; } }
target:  Check cache's time If cache's time is old, call flushCache()