BAEL-6036: Enable caching on the TasksService for Lightrun Article (#13221)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.baeldung.tasksservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.autoconfigure.cache.CacheManagerCustomizer;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class SimpleCacheCustomizer implements CacheManagerCustomizer<ConcurrentMapCacheManager> {
|
||||
|
||||
@Override
|
||||
public void customize(ConcurrentMapCacheManager cacheManager) {
|
||||
cacheManager.setCacheNames(List.of("tasks"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user