KayHut Interview Question

implement a cache algorithm (or pseudo)