Created
December 22, 2017 15:04
-
-
Save Romeh/528b1831081fe34790805cf7227cefeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Autowired | |
private javax.cache.CacheManager cacheManager; | |
// get access to your cache for further operation | |
private Cache<String, List<AlertEntry>> getAlertsCache() { | |
return cacheManager.getCache(CacheNames.Alerts.name()); | |
} | |
// close the cache manager upon shutting down | |
@PreDestroy | |
public void close(){ | |
cacheManager.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment