1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Cache OMDb resources for up to a month

This commit is contained in:
Reinhard Pointner 2017-02-27 22:08:52 +08:00
parent 9b7a6041cd
commit 1d91160521

View File

@ -125,7 +125,7 @@ public class OMDbClient implements MovieIdentificationService {
}
public Object request(Map<String, Object> parameters) throws Exception {
Cache cache = Cache.getCache(getName(), CacheType.Weekly);
Cache cache = Cache.getCache(getName(), CacheType.Monthly);
String key = '?' + encodeParameters(parameters, true);
return cache.json(key, s -> getResource(s)).fetch(withPermit(fetchIfModified(), r -> REQUEST_LIMIT.acquirePermit())).expire(Cache.ONE_WEEK).get();