Amazon interview question

How to use cache api