1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Best effort to avoid cache corruption if process is killed or crashes

This commit is contained in:
Reinhard Pointner 2019-02-17 18:30:16 +07:00
parent 5777a700bc
commit c9c4e84ee4

View File

@ -149,6 +149,9 @@ public class License {
return WebRequest.post(url, psm.getBytes(UTF_8), "application/octet-stream", getRequestParameters());
}).expire(Cache.ONE_MONTH).get();
// flush all cache from memory to the disk store
cache.flush();
if (getInteger(json, "status") != 200) {
throw new IllegalStateException(getString(json, "message"));
}