Caching external state