I'd like to ask for some details on these (probably Steve): read-write:: If the application needs to update data, a read-write cache might be appropriate. This cache strategy should never be used if serializable transaction isolation level is required. If the cache is used in a JTA environment, you must specify the `hibernate.transaction.jta.platform` property. In other environments, you should ensure that the transaction is completed when `Session.close()` or `Session.disconnect()` is called. If you want to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. nonstrict-read-write:: If the application only occasionally needs to update data (e.g. if it is extremely unlikely that two transactions would try to update the same item simultaneously) and strict transaction isolation is not required, a nonstrict-read-write cache might be appropriate. If the cache is used in a JTA environment, you must specify the `hibernate.transaction.jta.platform` property. In other environments, you should ensure that the transaction is completed when `Session.close()` or `Session.disconnect()` is called.
Why should the strategy 'never be used if serializable transaction isolation level is required'? What guarantees it gives, and what in ORM core depends on this? When I've asked the last time, Steve said that all modes but the nonstrict one require that the 2LC is absolutely transparent (consistency-wise), so you always get the same answer as if you were directly talking to DB. I also don't really see what's the meaning of 'underlying cache implementation supports locking' - IMO it's implementation detail how the application achieves required level of consistency. The 'locking' term itself is a bit vague. Does the ' you should ensure that the transaction is completed when `Session.close()` or `Session.disconnect()` is called' still hold, or does the transactional rework in 5.0 somehow obsolete this info? Thanks Radim On 01/21/2016 04:34 PM, Radim Vansa wrote: > Seems much more comprehensive, though I can't find e.g. > 'Cache-provider/concurrency-strategy compatibility' table (already > out-of-date). Nevertheless, thanks! > > I'll try to find some timeslot for updating it early next week. > > Radim > > On 01/21/2016 04:17 PM, Vlad Mihalcea wrote: >> Hi Radim, >> >> I've just committed the updated version of the Caching chapter. >> To build it, you need to: >> >> 1. go to the documentation folder >> 2. run gradle rUG >> 3. The new user guide is located under: >> documentation/target/asciidoc/userguide/html/Hibernate_User_Guide.html >> >> Let me know what you think. >> >> Vlad >> >> On Wed, Jan 20, 2016 at 11:57 AM, Vlad Mihalcea >> <mihalcea.v...@gmail.com <mailto:mihalcea.v...@gmail.com>> wrote: >> >> Hi Radim, >> >> I'm now filling in the missing sections on the Caching chapter in >> the 5.1 User Guide. >> >> Vlad >> >> On Wed, Jan 20, 2016 at 11:32 AM, Radim Vansa <rva...@redhat.com >> <mailto:rva...@redhat.com>> wrote: >> >> I would say that the best source is 4.x docs, since the cited >> source is >> what I describe by 'close to nothing'. >> >> I understand that for 5.1 the transformation might be >> unfinished, but I >> was surprised by the same for 5.0 - missing information that's >> written, >> maybe just not formatted properly for asciiidoc. In such case, >> link to >> appropriate chapter in older docs would be useful. >> >> Radim >> >> On 01/19/2016 07:04 PM, Steve Ebersole wrote: >> > The docs are in a state of flux for 5.1. For now your best >> bet is the >> > source: >> >> documentation/src/main/asciidoc/userguide/chapters/caching/Caching.adoc >> > >> > On Fri, Jan 15, 2016 at 3:48 AM Radim Vansa >> <rva...@redhat.com <mailto:rva...@redhat.com> >> > <mailto:rva...@redhat.com <mailto:rva...@redhat.com>>> wrote: >> > >> > Hi, >> > >> > I was about to fill some gaps in 2LC docs regarding >> improvements in >> > 5.0/5.1, but when I took a look into 5.0 docs [1] >> there's close to >> > nothing; is it by purpose? In 4.3 docs [2], there's much >> more on this >> > subject. Am I looking in a wrong place? >> > >> > Radim >> > >> > [1] >> > >> >> http://docs.jboss.org/hibernate/orm/5.0/userGuide/en-US/html_single/#caching >> > [2] >> > >> >> http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#performance-cache >> > >> > -- >> > Radim Vansa <rva...@redhat.com >> <mailto:rva...@redhat.com> <mailto:rva...@redhat.com >> <mailto:rva...@redhat.com>>> >> > JBoss Performance Team >> > >> > _______________________________________________ >> > hibernate-dev mailing list >> > hibernate-dev@lists.jboss.org >> <mailto:hibernate-dev@lists.jboss.org> >> <mailto:hibernate-dev@lists.jboss.org >> <mailto:hibernate-dev@lists.jboss.org>> >> > https://lists.jboss.org/mailman/listinfo/hibernate-dev >> > >> >> >> -- >> Radim Vansa <rva...@redhat.com <mailto:rva...@redhat.com>> >> JBoss Performance Team >> >> _______________________________________________ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> <mailto:hibernate-dev@lists.jboss.org> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> >> >> > -- Radim Vansa <rva...@redhat.com> JBoss Performance Team _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev