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
1 changed files with 1 additions and 1 deletions

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();