* use disk-persistent (2 days) cache for TheTVDB
This commit is contained in:
parent
6c415e4113
commit
a0d09d2c83
|
@ -118,17 +118,17 @@
|
||||||
memoryStoreEvictionPolicy="LRU"
|
memoryStoreEvictionPolicy="LRU"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Short-lived memory cache for web responses. Time to live is 10 min. This cache is used by TheTVDBClient.
|
Short-lived (48 hours) persistent cache for web responses.
|
||||||
-->
|
-->
|
||||||
<cache name="web"
|
<cache name="web-datasource"
|
||||||
maxElementsInMemory="120"
|
maxElementsInMemory="120"
|
||||||
|
maxElementsOnDisk="120"
|
||||||
eternal="false"
|
eternal="false"
|
||||||
timeToIdleSeconds="600"
|
timeToIdleSeconds="172800"
|
||||||
timeToLiveSeconds="600"
|
timeToLiveSeconds="172800"
|
||||||
overflowToDisk="false"
|
overflowToDisk="true"
|
||||||
diskPersistent="false"
|
diskPersistent="true"
|
||||||
memoryStoreEvictionPolicy="LRU"
|
memoryStoreEvictionPolicy="LRU"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
Very long-lived cache (one month!) anime/series list and episode information.
|
Very long-lived cache (one month!) anime/series list and episode information.
|
||||||
-->
|
-->
|
||||||
<cache name="web-persistent-datasource"
|
<cache name="web-persistent-datasource"
|
||||||
maxElementsInMemory="20"
|
maxElementsInMemory="40"
|
||||||
maxElementsOnDisk="240"
|
maxElementsOnDisk="240"
|
||||||
eternal="false"
|
eternal="false"
|
||||||
timeToIdleSeconds="2628000"
|
timeToIdleSeconds="2628000"
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider {
|
||||||
|
|
||||||
private final Map<MirrorType, String> mirrors = new EnumMap<MirrorType, String>(MirrorType.class);
|
private final Map<MirrorType, String> mirrors = new EnumMap<MirrorType, String>(MirrorType.class);
|
||||||
|
|
||||||
private final TheTVDBCache cache = new TheTVDBCache(CacheManager.getInstance().getCache("web"));
|
private final TheTVDBCache cache = new TheTVDBCache(CacheManager.getInstance().getCache("web-datasource"));
|
||||||
|
|
||||||
|
|
||||||
public TheTVDBClient(String apikey) {
|
public TheTVDBClient(String apikey) {
|
||||||
|
|
Loading…
Reference in New Issue