I've read the documentation on them, but I'm still not clear what the actual difference is. The docs state for ItemCoordinateCache that:
Caching is enabled for the item's logical (local) coordinate system.
while for QGraphicsItem::DeviceCoordinateCache:
Caching is enabled at the paint device level, in device coordinates. This mode is for items that can move, but are not rotated, scaled or sheared.
This did not clear things up for me. OK, so DeviceCoordinateCache can't be used for rotation, scaling or shearing, and it uses "device coordinates".
But what does this mean, exactly? There is an off-screen buffer, and I assume for local coordinates the buffer is filled with the item's cached image, and then acts like a QGraphicsPixmapItem and any effects such as opacity and the transform matrix are applied to it. I assume the problem is that this rasterizes the item's image so that's why the docs warn that it won't be pixel-perfect.
But how does it work with a DeviceCoordinateCache? Is the item first rotated, sheared and scaled and then painted on the off-screen pixmap, or is it that it's rendered the same on the pixmap but no transformations are then applied?
Edit: Also I tried setting DeviceCoordinateCache to a rotated and scaled item and it displayed perfectly, even when I resized it, so I don't understand why the docs say it shouldn't be used with scaled, rotated or sheared items.