Moved a few cache related methods into InMemoryCache class