[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Eclipselink caching behaviour
|
By default only the find() operation will get a cache hit, queries will
always go to the database.
You can allow a query to get a cache hit using the
"eclipselink.query-type"="ReadObject" query hint.
elygre wrote:
>
> I'm working on understanding the eclipselink cache, and I still have quite
> a
> way to go J
>
>
>
> I have an entity with a single column primary key (String). If i use
> "em.find(key)", this is cached, so that repeated lookups don't go to the
> database. If i create a Query referring the key ("select o from IkbPage o
> where key = ?1"), and then use query.getSingleResult(), it is not cached,
> and I see multiple identical queries.
>
>
>
> Is there a configuration option I need to switch on?
>
> Or is this just not possible?
>
>
>
> Eirik
>
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Eclipselink-caching-behaviour-tp18826933p18831873.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.