Pergunta de entrevista da empresa Snap

How would you go about creating a caching algorithm in c++?