Amazon interview question

Implement a cache in Java.