Finished support for AMI caching.