1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-10 06:20:27 -04:00

Unify long-term caches

This commit is contained in:
Reinhard Pointner 2019-02-12 00:03:16 +07:00
parent 580f2bd8f4
commit 6aa65ce3d6

View File

@ -134,7 +134,7 @@ public class License {
} }
private static void verifyLicense(String id, String psm) throws Exception { private static void verifyLicense(String id, String psm) throws Exception {
Cache cache = CacheManager.getInstance().getCache("license", CacheType.Persistent); Cache cache = CacheManager.getInstance().getCache("data", CacheType.Persistent);
Object json = cache.json(id, i -> new URL("https://license.filebot.net/verify/" + i)).fetch((url, modified) -> WebRequest.post(url, psm.getBytes(UTF_8), "application/octet-stream", getRequestParameters())).expire(Cache.ONE_MONTH).get(); Object json = cache.json(id, i -> new URL("https://license.filebot.net/verify/" + i)).fetch((url, modified) -> WebRequest.post(url, psm.getBytes(UTF_8), "application/octet-stream", getRequestParameters())).expire(Cache.ONE_MONTH).get();
if (getInteger(json, "status") != 200) { if (getInteger(json, "status") != 200) {