This was my original thought. We already have the thread local so should be straight fwd to just wrap the Field name and use that as the key. Again thanks, I really appreciate the feedback On Aug 19, 2015 8:12 AM, "Yonik Seeley" <ysee...@gmail.com> wrote:
> On Tue, Aug 18, 2015 at 10:58 PM, Jamie Johnson <jej2...@gmail.com> wrote: > > Hmm...so I think I have things setup correctly, I have a custom > > QParserPlugin building a custom query that wraps the query built from the > > base parser and stores the user who is executing the query. I've added > the > > username to the hashCode and equals checks so I think everything is setup > > properly. I ran a quick test and it definitely looks like my items are > > being cached now per user, which is really great. > > > > The outage that I'm running into now is the FieldValueCache doesn't take > > into account the query, so the FieldValueCache is built for user a and > then > > reused for user b, which is an issue for me. In short I'm back to my > > NoOpCache for FieldValues. It's great that I'm in a better spot for the > > others, but is there anything that can be done with FieldValues to take > > into account the requesting user? > > I guess a cache implementation that gets the user through a thread > local and either wraps the original key with an object containing the > user, or delegates to a per-user cache underneath. > > -Yonik >