Moar default values in cache module

This commit is contained in:
Alexandre Archambault 2016-01-03 16:38:29 +01:00
parent 9668f0e10c
commit 222faf18dc
1 changed files with 9 additions and 4 deletions

View File

@ -395,8 +395,8 @@ object Cache {
def file( def file(
artifact: Artifact, artifact: Artifact,
cache: Seq[(String, File)], cache: Seq[(String, File)] = default,
cachePolicy: CachePolicy, cachePolicy: CachePolicy = CachePolicy.FetchMissing,
checksums: Seq[Option[String]] = Seq(Some("SHA-1")), checksums: Seq[Option[String]] = Seq(Some("SHA-1")),
logger: Option[Logger] = None, logger: Option[Logger] = None,
pool: ExecutorService = defaultPool pool: ExecutorService = defaultPool
@ -446,8 +446,8 @@ object Cache {
} }
def fetch( def fetch(
cache: Seq[(String, File)], cache: Seq[(String, File)] = default,
cachePolicy: CachePolicy, cachePolicy: CachePolicy = CachePolicy.FetchMissing,
checksums: Seq[Option[String]] = Seq(Some("SHA-1")), checksums: Seq[Option[String]] = Seq(Some("SHA-1")),
logger: Option[Logger] = None, logger: Option[Logger] = None,
pool: ExecutorService = defaultPool pool: ExecutorService = defaultPool
@ -480,6 +480,11 @@ object Cache {
) )
) )
lazy val default = Seq(
"http://" -> new File(defaultBase, "http"),
"https://" -> new File(defaultBase, "https")
)
val defaultConcurrentDownloadCount = 6 val defaultConcurrentDownloadCount = 6
lazy val defaultPool = lazy val defaultPool =