public LPSubjectReference obtain(Subject subject) {
        Objects.requireNonNull(subject, "subject");
        if (subject instanceof LPProxiedSubject) {
            return ((LPProxiedSubject) subject).asSubjectReference();
        }

        return obtain(subject.containingCollection().identifier(), subject.identifier());
    }
Cache based factory for SubjectReferences.

Using a factory and caching here makes the Subject cache in SubjectReference
more effective. This reduces the no. of times i/o is executed due to resolve calls
within the SubjectReference.

It's perfectly ok if two instances of the same SubjectReference exist. (hence the 1 hour expiry)
sponge/sponge-service/src/main/java/me/lucko/luckperms/sponge/service/reference/SubjectReferenceFactory.java