Added simple caching.