You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Gustav Trede <gu...@telia.com> on 2008/07/03 17:31:18 UTC
Query to return shared data for performance reasons.
hello,
Im interested in helping openjpa to implement that query can return
shared objects from the cache.
On many usage cases its only of interest to read data, no need to get a
clone/copy then.
(and yes its up to the user to not actually edit the returned data.)
This exists in eclipselink and works good, QueryHints.READ_ONLY.
Could i please get some initial help, where to do this in the code base
in a nice way ?.
regards
gustav
Re: Query to return shared data for performance reasons.
Posted by Gustav Trede <gu...@telia.com>.
hello,
The situation im talking about is the current enforced cloning of the
return data from the cache .
Its not needed to clone data in read-only situations.
This functionality is available in eclipselink.
A query hint QueryHints.READ_ONLY is used to enable return of data from
cache "by reference",ie not a copy / cloned.
Jeremy Bauer skrev:
> Hi Gustav,
>
> This may not be exactly what you have in mind, but OpenJPA has a data
> cache for caching entities and a query result cache for caching
> certain types of query results. Properly tuned, these caches can
> dramatically improve the performance of cache-suitable applications.
>
> Here is a link to the caching documentation.
> http://openjpa.apache.org/builds/1.1.0/docs/ref_guide_caching.html
>
> -Jeremy
>
> On Thu, Jul 3, 2008 at 10:31 AM, Gustav Trede
> <gu...@telia.com> wrote:
>
>> hello,
>>
>> Im interested in helping openjpa to implement that query can return shared
>> objects from the cache.
>>
>> On many usage cases its only of interest to read data, no need to get a
>> clone/copy then.
>> (and yes its up to the user to not actually edit the returned data.)
>>
>> This exists in eclipselink and works good, QueryHints.READ_ONLY.
>>
>> Could i please get some initial help, where to do this in the code base in
>> a nice way ?.
>>
>> regards
>> gustav
>>
>>
>
>
Re: Query to return shared data for performance reasons.
Posted by Jeremy Bauer <te...@gmail.com>.
Hi Gustav,
This may not be exactly what you have in mind, but OpenJPA has a data
cache for caching entities and a query result cache for caching
certain types of query results. Properly tuned, these caches can
dramatically improve the performance of cache-suitable applications.
Here is a link to the caching documentation.
http://openjpa.apache.org/builds/1.1.0/docs/ref_guide_caching.html
-Jeremy
On Thu, Jul 3, 2008 at 10:31 AM, Gustav Trede
<gu...@telia.com> wrote:
> hello,
>
> Im interested in helping openjpa to implement that query can return shared
> objects from the cache.
>
> On many usage cases its only of interest to read data, no need to get a
> clone/copy then.
> (and yes its up to the user to not actually edit the returned data.)
>
> This exists in eclipselink and works good, QueryHints.READ_ONLY.
>
> Could i please get some initial help, where to do this in the code base in
> a nice way ?.
>
> regards
> gustav
>