X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FCacheLibrary.java;h=a550740bafa7a9105d271ef9dd7df53515651d6e;hb=cf45a4c44b472d0e1bbbcbc9891020366e99364c;hp=8b1a3c7e65ea570bf01407f73dea984956cadc97;hpb=0dc195ded76734e34d0f84727d80bf439d3f4271;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/CacheLibrary.java b/src/be/nikiroo/fanfix/library/CacheLibrary.java index 8b1a3c7..a550740 100644 --- a/src/be/nikiroo/fanfix/library/CacheLibrary.java +++ b/src/be/nikiroo/fanfix/library/CacheLibrary.java @@ -117,7 +117,12 @@ public class CacheLibrary extends BasicLibrary { return custom; } - return cacheLib.getSourceCover(source); + Image cached = cacheLib.getSourceCover(source); + if (cached != null) { + return cached; + } + + return lib.getSourceCover(source); } @Override @@ -249,6 +254,9 @@ public class CacheLibrary extends BasicLibrary { /** * Clear the {@link Story} from the cache. + *

+ * The next time we try to retrieve the {@link Story}, it may be required to + * cache it again. * * @param luid * the story to clear