Add a very simple cache logic