git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix remote default covers
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
CacheLibrary.java
diff --git
a/src/be/nikiroo/fanfix/library/CacheLibrary.java
b/src/be/nikiroo/fanfix/library/CacheLibrary.java
index 29920e8902b0090354ae7d82680fe7d4bdf866d3..a550740bafa7a9105d271ef9dd7df53515651d6e 100644
(file)
--- 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 custom;
}
- return cacheLib.getSourceCover(source);
+ Image cached = cacheLib.getSourceCover(source);
+ if (cached != null) {
+ return cached;
+ }
+
+ return lib.getSourceCover(source);
}
@Override
}
@Override
@@
-136,7
+141,7
@@
public class CacheLibrary extends BasicLibrary {
@Override
public void setSourceCover(String source, String luid) {
lib.setSourceCover(source, luid);
@Override
public void setSourceCover(String source, String luid) {
lib.setSourceCover(source, luid);
- cacheLib.setSourceCover(source, get
SourceCover(source
));
+ cacheLib.setSourceCover(source, get
Cover(luid
));
}
@Override
}
@Override
@@
-249,6
+254,9
@@
public class CacheLibrary extends BasicLibrary {
/**
* Clear the {@link Story} from the cache.
/**
* Clear the {@link Story} from the cache.
+ * <p>
+ * The next time we try to retrieve the {@link Story}, it may be required to
+ * cache it again.
*
* @param luid
* the story to clear
*
* @param luid
* the story to clear