Bring back old MemoryCacheParams constructor to prevent breaking API change
package com.facebook.imagepipeline.cache;
+import java.util.concurrent.TimeUnit;
+
/**
* Configuration for a memory cache.
*/
@@ -19,6 +21,31 @@ public class MemoryCacheParams {
public final int maxCacheEntrySize;
public final long paramsCheckIntervalMs;
+ /**
+ * Pass arguments to control the cache's behavior in the constructor.
+ *
+ * @param maxCacheSize The maximum size of the cache, in bytes.
+ * @param maxCacheEntries The maximum number of items that can live in the cache.
+ * @param maxEvictionQueueSize The eviction queue is an area of memory that stores items ready for
+ * eviction but have not yet been deleted. This is the maximum size of that queue in bytes.
+ * @param maxEvictionQueueEntries The maximum number of entries in the eviction queue.
+ * @param maxCacheEntrySize The maximum size of a single cache entry.
+ */
+ public MemoryCacheParams(
+ int maxCacheSize,
+ int maxCacheEntries,
+ int maxEvictionQueueSize,
+ int maxEvictionQueueEntries,
+ int maxCacheEntrySize) {
+ this(
+ maxCacheSize,
+ maxCacheEntries,
+ maxEvictionQueueSize,
+ maxEvictionQueueEntries,
+ maxCacheEntrySize,
+ TimeUnit.MINUTES.toMillis(5));
+ }
+
/**
* Pass arguments to control the cache's behavior in the constructor.
*
