Use WEBP as on-disk format and increase ttl because reasons.
This commit is contained in:
1 parent
9740ff1c17
commit
f920096737
1 file changed
+4
-2
@@ -234,7 +234,7 @@ public class CoverCache {
|
||||
/**
|
||||
* Restrict lifetime of cached objects to, at most, OBJECT_TTL
|
||||
*/
|
||||
private final static int OBJECT_TTL = 86400*4;
|
||||
private final static int OBJECT_TTL = 86400*8;
|
||||
|
||||
/**
|
||||
* Creates a new BitmapDiskCache instance
|
||||
@@ -357,7 +357,9 @@ public class CoverCache {
|
||||
trim(mCacheSize);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
cover.compress(Bitmap.CompressFormat.PNG, 100, out);
|
||||
// We store a lossy version as this image was
|
||||
// created from the original source (and will not be re-compressed)
|
||||
cover.compress(Bitmap.CompressFormat.WEBP, 90, out);
|
||||
|
||||
Random rnd = new Random();
|
||||
long ttl = getUnixTime() + rnd.nextInt(OBJECT_TTL);
|
||||
|
||||
Reference in new issue
Block a user