I tried but got concerned that it might not be safe. Sadly didn't find time to chat more with you, but this is essentially what I fear:
the _type_ and the _id_ are not enough to unequivocally identify a cached value as someone has the flexibility to use the same caches to store multiple roles. Obviously we also have to allow for that multiple entities to use a same type for the identifier, so the conclusion is that two types having - for example - Integer as pk and "1" as value for it, they will collide even if technically they pertain to different tables.