Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Using the resource resolver principal as a cache key may improve Neba's request-scoped resource model cache hit ratio #376
To ensure that the request-scoped resource model cache does not leak privileges, the identity of the resource resolver used to obtain a model instance is used as part of the cache key. However, the identity of the instance may change within the same request even if the resource resolver privileges remain unchanged. For instance, multiple resolver instances may be opened and closed for the same user.
Here, using the principal name associated with the resource resolver instead of the resolver's object ID may improve the hit/miss ratio.