Skip to content

Instantly share code, notes, and snippets.

View tedwon's full-sized avatar

Ted Won tedwon

View GitHub Profile
static final class LIRSEvictionPolicy<K, V> implements EvictionPolicy<K, V> {
/**
* The percentage of the cache which is dedicated to hot blocks. See section 5.1
*/
private static final float L_LIRS = 0.95f;
final BoundedEquivalentConcurrentHashMapV8<K, V> map;
// LIRS stack S
/**
* The LIRS stack, S, which is maintains recency information. All hot entries are on the
package controllers
import play.api.Logger
import play.api.Play.current
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import play.api.libs.ws.{WS, WSResponse}
import play.api.mvc._
import scala.compat.Platform
import scala.concurrent.Future