Add support for caching.