backup manga mining
/*
def constructContents(i: Int): List[Content]
= (1 to amount).map{ i =>
val id = cache.get("week_pop_id_" + i)
val title = cache.get("week_pop_title_" + i)
val views = cache.get("week_pop_views_" + i)
val category = cache.get("week_pop_category_" + i)
val date = cache.get("week_pop_date_" + i)
val storages = content.storages.map( link => cache.rpush("week_pop_storages_" + i, link)
}
def saveContentsToRedis(contents: List[Content]) =
= contents.zipWithIndex.foreach{ each =>
val content = each._1
val i = each._2
cache.set("week_pop_id_" + i, content.id)
cache.set("week_pop_title_" + i, content.title)
cache.set("week_pop_views_" + i, content.views)
cache.set("week_pop_category_" + i, content.category)
cache.set("week_pop_date_" + i, content.date)
content.storages.foreach( link => cache.rpush("week_pop_storages_" + i, link)
}
*/