Recently (as of version 1.8), Ansible gained the ability to cache facts between playbook runs. Where facts are cached depends on the configured cache plugin that is used. Ansible includes plugins to cache facts in memory (not actually cached between runs): memcached, redis, and jsonfile. Creating a fact-caching plugin can enable additional caching mechanisms.