retrieve a value from the Session map

Hi,

Could someone tell me the syntax to retrieve a value from the Session map? The below returns the whole session.

.check(status.is(200),
headerRegex( “X-Cache”, “HIT|MISS”).saveAs(“cacheRatio”)))

.exec { session =>
println(session(“cacheRatio”))
session
}

You need to specify the type of the attribute you want to extract as such:

session(“cacheRatio”).as[String]