You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2016/10/26 13:51:18 UTC

Explicitly invalidating all cached objects in a ServerRuntime/ObjectContext

Hi all.
I’ve been fighting a little with caching in the past few days. Is there any way for me to just tell Cayenne invalidate all cached data? Just tell it that the universe as it know it is now invalid and all queries should fetch fresh data?

Cheers,
- hugi

Re: Explicitly invalidating all cached objects in a ServerRuntime/ObjectContext

Posted by John Huss <jo...@gmail.com>.
A big, big soda.  If I don't have diabetes yet.   :-)

On Wed, Oct 26, 2016 at 9:57 AM Hugi Thordarson <hu...@karlmenn.is> wrote:

> I owe you a big, big beer. Or a soda if you prefer.
>
> Cheers,
> - hugi
>
>
> > On 26. okt. 2016, at 14:39, John Huss <jo...@gmail.com> wrote:
> >
> > Collection<?> allNodes = context.getGraphManager().registeredNodes();
> >
> > context.invalidateObjects(allNodes);
> >
> > On Wed, Oct 26, 2016 at 8:51 AM Hugi Thordarson <hu...@karlmenn.is>
> wrote:
> >
> >> Hi all.
> >> I’ve been fighting a little with caching in the past few days. Is there
> >> any way for me to just tell Cayenne invalidate all cached data? Just
> tell
> >> it that the universe as it know it is now invalid and all queries should
> >> fetch fresh data?
> >>
> >> Cheers,
> >> - hugi
>
>

Re: Explicitly invalidating all cached objects in a ServerRuntime/ObjectContext

Posted by Hugi Thordarson <hu...@karlmenn.is>.
I owe you a big, big beer. Or a soda if you prefer.

Cheers,
- hugi


> On 26. okt. 2016, at 14:39, John Huss <jo...@gmail.com> wrote:
> 
> Collection<?> allNodes = context.getGraphManager().registeredNodes();
> 
> context.invalidateObjects(allNodes);
> 
> On Wed, Oct 26, 2016 at 8:51 AM Hugi Thordarson <hu...@karlmenn.is> wrote:
> 
>> Hi all.
>> I’ve been fighting a little with caching in the past few days. Is there
>> any way for me to just tell Cayenne invalidate all cached data? Just tell
>> it that the universe as it know it is now invalid and all queries should
>> fetch fresh data?
>> 
>> Cheers,
>> - hugi


Re: Explicitly invalidating all cached objects in a ServerRuntime/ObjectContext

Posted by John Huss <jo...@gmail.com>.
Collection<?> allNodes = context.getGraphManager().registeredNodes();

context.invalidateObjects(allNodes);

On Wed, Oct 26, 2016 at 8:51 AM Hugi Thordarson <hu...@karlmenn.is> wrote:

> Hi all.
> I’ve been fighting a little with caching in the past few days. Is there
> any way for me to just tell Cayenne invalidate all cached data? Just tell
> it that the universe as it know it is now invalid and all queries should
> fetch fresh data?
>
> Cheers,
> - hugi