I have a large map that won't fit in memory and I thus want it to live on the disk. I have the following options:
getOrElseUpdate and ++= and the
apply/update methods. I could create my own wrapper class around MapDB in Scala but I really don't want to manually implement all the Map traits.   Map traits for redis or memcached. This may be the better performance solution but it introduces a complexity of running a dbSo is there any nice scala only library that implements the Scala collection sugars for maps and yet it falls back on disk and/or a key-value store for large maps?
Answered my own question
import collection.mutable
import org.mapdb.DBMaker
import collection.JavaConversions._
val cache: mutable.Map[String, Seq[String]] = DBMaker.newTempHashMap[String, Seq[String]]()
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With