ProjectCache should be queried only when the resource is expected to contain a project