mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
* auto-shutdown ehcache (so it's only shut down if it has been initialized before)
This commit is contained in:
parent
c0828bb8a5
commit
e277ea2af3
@ -338,6 +338,10 @@ public class Main {
|
||||
* Shutdown ehcache properly, so that disk-persistent stores can actually be saved to disk
|
||||
*/
|
||||
private static void initializeCache() {
|
||||
// auto-shutdown ehcache
|
||||
System.setProperty("net.sf.ehcache.enableShutdownHook", "true");
|
||||
Logger.getLogger("net.sf.ehcache.CacheManager").setLevel(Level.OFF);
|
||||
|
||||
// prepare cache folder for this application instance
|
||||
File cacheRoot = new File(getApplicationFolder(), "cache");
|
||||
|
||||
@ -360,7 +364,6 @@ public class Main {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
CacheManager.getInstance().shutdown();
|
||||
try {
|
||||
lock.release();
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user