db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Ignore Cache option on Query
Date Thu, 08 Jul 2004 08:21:22 GMT
Brian McCallister wrote:

> For example, the cache is queried for an instance of Foo which it 
> contains. The cache instantiates foo, sets the correct values, and sees 
> it needs a collection. It has the collection in it as a set of identity 
> instances. The collection may contain 15 items, 10 of which it knows it 
> has in the cache. It would be nice for the cache to be able to go grab 
> the remaining 5 items by a specific query rather than issue the more 
> general criteria based query for the whole collection.
>

+1, this can be handled by the CacheBroker implementation mentioned in 
my previous mail. In my crashed second level cache implementation I 
collect the Identity objects of "unknown" objects and use a modified 
version of
PBImpl#getDBObject(Identity oid, boolean performReferences)
to materialize the missed items (without depended objects). But this 
solution will cause many single queries.


> This requires being able to ignore the cache though as it would need to 
> issue query on same broker to maintain the transaction, but then it 
> would cycle back into itself. This may actually be okay -- as it 
> specifically formed the query to ask for things it doesn't have.
> 
> Anyway, aside from that, JDO2 requires the ability to ignore second 
> level cache in a query =)
> 

This can be handled by a flag on PB, PB#setCache(boolean ignore) or we 
introduce this flag in the Query object itself.

Armin

> -Brian
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message