You're looking up iid in cacheIndices twice here.  You could do it once with find.  i.e.:

QHash<...>::const_iterator it = instancePtr->m_cacheIndices.constFind(iid);
if (it != instancePtr->m_cacheIndices.constEnd()) {
     return &instancePtr=->m_cache[*it];
}