Implement cache usage.

Note for prospective employers: We are supposed to use a linked-list cache model
from an older assignment. I know there are much better ways.