Bazaarvoice interview question

implement a cache function