Adding support for caching.