There are many ways to do that, but I would do something simple like the following.
import scala.concurrent.ops._
spawn {
while (true) {
Thread.sleep(1000);
// clear the cache's old entries
}
}
Hope this helps.
There are many ways to do that, but I would do something simple like the following.
import scala.concurrent.ops._
spawn {
while (true) {
Thread.sleep(1000);
// clear the cache's old entries
}
}
Hope this helps.