Added domain and range caching.