basic implementation of caching. More examples with messages will follow, but this will do at this point as an example