Downloader: allow switching the cache
authorNiki Roo <niki@nikiroo.be>
Fri, 22 Jun 2018 17:20:16 +0000 (17:20 +0000)
committerNiki Roo <niki@nikiroo.be>
Fri, 22 Jun 2018 17:20:16 +0000 (17:20 +0000)
src/be/nikiroo/utils/Downloader.java

index 651abc3a65932fbc9cbd7355610eb1c2292db21f..4976c483aef7ab8be33fb21ee757f205b13b292f 100644 (file)
@@ -88,6 +88,25 @@ public class Downloader {
                this.tracer = tracer;
        }
 
+       /**
+        * The {@link Cache} to use for all access (can be NULL).
+        * 
+        * @return the cache
+        */
+       public Cache getCache() {
+               return cache;
+       }
+
+       /**
+        * The {@link Cache} to use for all access (can be NULL).
+        * 
+        * @param cache
+        *            the new cache
+        */
+       public void setCache(Cache cache) {
+               this.cache = cache;
+       }
+
        /**
         * Clear all the cookies currently in the jar.
         * <p>