added the beginnings of the caching api.