Port feature from 1.4x branch to disable instance caching