Expiry time @cacheable spring boot

I use life hacking like this:

@Configuration
@EnableCaching
@EnableScheduling
public class CachingConfig {

  public static final String GAMES = "GAMES";

  @Bean
  public CacheManager cacheManager() {
    ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager(GAMES);
    return cacheManager;
  }

  @CacheEvict(allEntries = true, value = {GAMES})
  @Scheduled(fixedDelay = 10 * 60 * 1000 ,  initialDelay = 500)
  public void reportCacheEvict() {
    System.out.println("Flush Cache " + dateFormat.format(new Date()));
  }

}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)