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

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
 

Back to the top