Got thru below statement at http://docs.jboss.org/hibernate/core/3.3/reference/en/html/performance.html#performance-cache-nonstrict
If the application only occasionally needs to update data (i.e. if it is extremely unlikely that two transactions would try to update the same item simultaneously)
What I got from above statement is if developer updates a object in his code, sometime he want to update in second level cache and sometime does not. Right? If yes how he will achieve it in his code. I mean where he needs to specify in his code that this time he wants to update in cache and other time not.
You got it wrong. What this means if that this strategy should be used when the entity is sometimes updated (so read-only does not apply), but that it's extremely unlikely that two concurrent transactions update the same item. For example, if you have thousands of users accessing the data, an one batch regularly update it, this option is the right one to choose: only one transaction updates the items at a time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With