How to programmatically disable update checks for Ehcache?

I know that the attribute "updateCheck" can be set to "false" in an XML-like:

xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: noNamespaceSchemaLocation = "../config/ehcache.xsd" UpdateCheck = "false" Monitoring = "Automatic detection">

But I need to do this programmatically. How can I do it?

+4
source share
1 answer

Call this before using any ehcache functions:

System.setProperty("net.sf.ehcache.skipUpdateCheck", "true"); 
+4
source

Source: https://habr.com/ru/post/1304975/


All Articles