Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] javax.persistence.sharedCache.mode=ENABLE_SELECTIVE seems to have no effect

When you say you are loading the entity in your web app multiple times, how many different entity managers are involved?  Can you give me the steps you go through indicating which entity manager is involved in each step and where you see cache hits.

On 17/09/2013 8:47 AM, Andreas Joseph Krogh wrote:
På tirsdag 17. september 2013 kl. 14:36:09, skrev Tom Ware <tom.ware@xxxxxxxxxx>:
What behavior are you seeing that indicates the shared cache is being used?
 
I'm observing the DB-log (PG) which logs every statement. When I load an entity from my web-app multiple times the DB is hit only the first time.
 
This worked using Hibernate and IFAICT is according to spec:
 
* Set the JPA-property javax.persistence.sharedCache.mode=ENABLE_SELECTIVE
 
But only setting this in EL results in everything being cached so I tried to set eclipselink.cache.shared.default=false to prevent that, but then nothing is cached, not even entities annotated with @Cacheable.
 
How do I achieve ENABLE_SELECTIVE semantics, that is - only cache entities explicitly annotated with @Cacheable?
 
Thanks.
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top