Yes, invalidating the cache group will remove the cached data for all users
or query parameters, etc. It's not great.  You can make the cache group
more specific (like by adding a username or something to it) and that will
work, but you'll need to have these cache names configured in your cache
provider already or have a default that makes sense.  That might be
difficult to do.

I'm interested to hear how others handle this.  I see this being a fairly
big limitation of the query cache.

On Wed, Nov 8, 2017 at 11:23 AM Lon Varscsak <[email protected]> wrote:

> Yeah, I’m not syncing between contexts (as much as I’d like to :P)…this is
> about query caches.
>
> On Wed, Nov 8, 2017 at 3:56 AM, Musall, Maik <[email protected]> wrote:
>
> > Hi Lon,
> >
> > have you read this? https://cayenne.apache.org/docs/4.0/cayenne-guide/
> > performance-tuning.html#turning-off-synchronization-of-objectcontexts <
> >
> https://cayenne.apache.org/docs/4.0/cayenne-guide/performance-tuning.html#
> > turning-off-synchronization-of-objectcontexts>
> >
> > I added this module to my server runtime builder (stripped down to the
> > relevant bit for this discussion):
> >
> > Module cachePropertiesModule = new Module() {
> >         @Override
> >         public void configure( Binder binder ) {
> >                 MapBuilder<String> props = binder.bindMap( String.class,
> > Constants.PROPERTIES_MAP );
> >                 props.put( Constants.SERVER_CONTEXTS_SYNC_PROPERTY,
> > "false" );
> >         }
> > };
> >
> > Maik
> >
> >
> > > Am 08.11.2017 um 01:40 schrieb Lon Varscsak <[email protected]>:
> > >
> > > Hey all,
> > >
> > > I’ve been using cache groups to do refreshing of object lists and it
> > > occurred to me today that this refresh is across all object contexts in
> > my
> > > application.  So if User A has a list of orders for their account and
> > that
> > > is cached with the group “orderHistory” and User B also has a list of
> > > orders in “orderHistory”, running a refresh query will result in ALL
> > users
> > > refreshing their orderHistory caches.
> > >
> > > I’m not sure that this is what I want.  How have you solved this
> > > situation?  Do you care? :P  I was thinking about doing something like
> > > WEB_SESSION_ID+cacheGroup…maybe this has some downsides I’m unaware of.
> > >
> > > Any feedback is appreciated.
> > >
> > > -Lon
> >
> >
>

Reply via email to